From 43c81355c4a53c4b976c076cd5ff4107661a1cc3 Mon Sep 17 00:00:00 2001 From: Nate Hunzaker Date: Mon, 16 Mar 2015 09:46:12 -0400 Subject: [PATCH] [remove] Unused dependency in Microscope. --- dist/Microcosm.js | 2 +- dist/Microcosm.js.map | 2 +- src/Microscope.jsx | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dist/Microcosm.js b/dist/Microcosm.js index 0dd61fb9..d4cb3c0c 100644 --- a/dist/Microcosm.js +++ b/dist/Microcosm.js @@ -1,2 +1,2 @@ -module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5);e.Store=r;var i=n(4);e.Microscope=i;var u=n(3);e.Microcosm=u,e["default"]=u},function(t){"use strict";t.exports=function(t,e){var n=void 0===arguments[0]?{}:arguments[0],r=void 0===arguments[2]?{}:arguments[2],i=Object.keys(n);return i.reduce(function(t,r){return t[r]=e(n[r],r),t},r)}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1)),u=function(t,e){return""+t+"-"+e};e.identify=u,e["default"]=function(t,e){return i(t,function(t,n){return u(e,n)})}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(){function t(t,e){for(var n in e){var r=e[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(t,e)}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=r(n(7)),s=r(n(8)),a=r(n(2)),c=r(n(1)),f=n(10).Dispatcher,l=function(){function t(e){u(this,t),this._seed=e||{},this._heart=o(),this._dispatcher=new f,this._dispatcher.register(this._enqueue.bind(this))}return i(t,{listen:{get:function(){return this._heart.listen}},ignore:{get:function(){return this._heart.ignore}},_enqueue:{value:function(t){for(var e in this.stores)this.stores[e].send(t);this._heart.beat()}},addActions:{value:function(t){this.actions=c(t,s(this._dispatcher))}},addStores:{value:function(t){var e=this,n=c(this.actions,a);this.stores=c(t,function(t,r){return new t(n,e._seed[r],e)})}},serialize:{value:function(){return c(this.stores,function(t){return t.serialize()})}}}),t}();t.exports=l},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},u=Object.assign||function(t){for(var e=1;e0&&(cancelAnimationFrame(e),e=requestAnimationFrame(n))}}}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(6)),u=r(n(1)),o=n(2).identify;t.exports=function(t){return function(e,n){return u(e,function(e,r){var u=o(n,r);return function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];return i(t,u,e.apply(void 0,r))}},{})}}},function(t){"use strict";t.exports=function(t){return t instanceof Promise?t:Promise.resolve(t)}},function(t){t.exports=require("flux")},function(t){t.exports=require("react/addons")}]); +module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5);e.Store=r;var i=n(4);e.Microscope=i;var u=n(3);e.Microcosm=u,e["default"]=u},function(t){"use strict";t.exports=function(t,e){var n=void 0===arguments[0]?{}:arguments[0],r=void 0===arguments[2]?{}:arguments[2],i=Object.keys(n);return i.reduce(function(t,r){return t[r]=e(n[r],r),t},r)}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(1)),u=function(t,e){return""+t+"-"+e};e.identify=u,e["default"]=function(t,e){return i(t,function(t,n){return u(e,n)})}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(){function t(t,e){for(var n in e){var r=e[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(t,e)}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=r(n(7)),s=r(n(8)),a=r(n(2)),c=r(n(1)),f=n(10).Dispatcher,l=function(){function t(e){u(this,t),this._seed=e||{},this._heart=o(),this._dispatcher=new f,this._dispatcher.register(this._enqueue.bind(this))}return i(t,{listen:{get:function(){return this._heart.listen}},ignore:{get:function(){return this._heart.ignore}},_enqueue:{value:function(t){for(var e in this.stores)this.stores[e].send(t);this._heart.beat()}},addActions:{value:function(t){this.actions=c(t,s(this._dispatcher))}},addStores:{value:function(t){var e=this,n=c(this.actions,a);this.stores=c(t,function(t,r){return new t(n,e._seed[r],e)})}},serialize:{value:function(){return c(this.stores,function(t){return t.serialize()})}}}),t}();t.exports=l},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},u=Object.assign||function(t){for(var e=1;e0&&(cancelAnimationFrame(e),e=requestAnimationFrame(n))}}}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(6)),u=r(n(1)),o=n(2).identify;t.exports=function(t){return function(e,n){return u(e,function(e,r){var u=o(n,r);return function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];return i(t,u,e.apply(void 0,r))}},{})}}},function(t){"use strict";t.exports=function(t){return t instanceof Promise?t:Promise.resolve(t)}},function(t){t.exports=require("flux")},function(t){t.exports=require("react/addons")}]); //# sourceMappingURL=Microcosm.js.map \ No newline at end of file diff --git a/dist/Microcosm.js.map b/dist/Microcosm.js.map index 2b6bf90f..600e3799 100644 --- a/dist/Microcosm.js.map +++ b/dist/Microcosm.js.map @@ -1 +1 @@ -{"version":3,"sources":["Microcosm.js","webpack/bootstrap 31fda76f647d5572d7d2","./src/index.js","./src/transpose.js","./src/prefix.js","./src/Microcosm.js","./src/Microscope.jsx","./src/Store.js","./src/dispatch.js","./src/heartbeat.js","./src/intent.js","./src/promiseWrap.js","external \"flux\"","external \"react/addons\""],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","Object","defineProperty","value","Store","Microscope","Microcosm","_x","fn","entity","undefined","arguments","initial","keys","reduce","memo","key","_interopRequire","obj","__esModule","transpose","identify","str","_createClass","defineProperties","target","props","prop","configurable","writable","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","Heartbeat","intent","prefix","Dispatcher","seed","this","_seed","_heart","_dispatcher","register","_enqueue","bind","listen","get","ignore","payload","s","stores","send","beat","addActions","actions","addStores","_this","constants","serialize","store","_objectWithoutProperties","i","indexOf","hasOwnProperty","_extends","assign","length","source","React","createClass","displayName","mixins","addons","PureRenderMixin","propTypes","flux","PropTypes","object","isRequired","watch","array","getDefaultProps","element","getInitialState","getState","_props","state","updateState","setState","componentDidMount","componentWillUnmount","render","children","other","members","Children","map","Component","cloneWithProps","createElement","_tasks","all","_ref","type","body","toJSON","promiseWrap","dispatcher","result","then","dispatch","_callbacks","_tick","_pump","callback","filter","concat","cancelAnimationFrame","requestAnimationFrame","methods","method","name","_len","args","Array","_key","apply","Promise","resolve","require"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAH,WACAK,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAAAE,GAGAH,EAAAO,QAAA,EAGA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UAAU2D,OU7clByD,EAAIC,MAAAF,GAAAG,EAAA,EAAAH,EAAAG,MAAJF,EAAIE,GAAAtH,UAAAsH,EVidZ,OUjdiBf,GAASH,EAAYJ,EAAMiB,EAAMM,MAAAxH,OAAIqH,aVydzD,SAAS1I,GAEd,YAOAA,GAAOC,QW1eO,SAAAa,GACb,MAAIA,aAAiBgI,SACZhI,EAEAgI,QAAQC,QAAQjI,KXgfrB,SAASd,GYzffA,EAAAC,QAAA+I,QAAA,SZ+fM,SAAShJ,Ga/ffA,EAAAC,QAAA+I,QAAA","file":"Microcosm.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * Microcosm\n\t * An isomorphic flux implimentation. The strength of Microcosm\n\t * is that each application is its own fully encapsulated world\n\t */\n\n\tvar Store = __webpack_require__(5);\n\texports.Store = Store;\n\tvar Microscope = __webpack_require__(4);\n\texports.Microscope = Microscope;\n\tvar Microcosm = __webpack_require__(3);\n\n\texports.Microcosm = Microcosm;\n\texports[\"default\"] = Microcosm;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * Transpose\n\t * Reduces over a value, setting the current index/key\n\t * to the result of a given function.\n\t *\n\t * For example:\n\t * transpose({ foo: 'bar' }, word => word.toUpperCase()) = { foo: 'BAR' }\n\t *\n\t */\n\n\tmodule.exports = function (_x, fn) {\n\t var entity = arguments[0] === undefined ? {} : arguments[0];\n\t var initial = arguments[2] === undefined ? {} : arguments[2];\n\n\t var keys = Object.keys(entity);\n\n\t return keys.reduce(function (memo, key) {\n\t memo[key] = fn(entity[key], key);\n\t return memo;\n\t }, initial);\n\t};\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * Prefix\n\t * Given an object, return a new object whos keys are prefixed with\n\t * a given string.\n\t *\n\t * This module is responsible for constructing action constants\n\t */\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar identify = function (str, key) {\n\t return \"\" + str + \"-\" + key;\n\t};\n\n\texports.identify = identify;\n\n\texports[\"default\"] = function (obj, str) {\n\t return transpose(obj, function (value, key) {\n\t return identify(str, key);\n\t });\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\n\t/**\n\t * Microcosm\n\t * An isomorphic flux implimentation. The strength of Microcosm\n\t * is that each application is its own fully encapsulated world\n\t */\n\n\tvar Heartbeat = _interopRequire(__webpack_require__(7));\n\n\tvar intent = _interopRequire(__webpack_require__(8));\n\n\tvar prefix = _interopRequire(__webpack_require__(2));\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar Dispatcher = __webpack_require__(10).Dispatcher;\n\n\tvar Microcosm = (function () {\n\t function Microcosm(seed) {\n\t _classCallCheck(this, Microcosm);\n\n\t this._seed = seed || {};\n\t this._heart = Heartbeat();\n\t this._dispatcher = new Dispatcher();\n\t this._dispatcher.register(this._enqueue.bind(this));\n\t }\n\n\t _createClass(Microcosm, {\n\t listen: {\n\t get: function () {\n\t return this._heart.listen;\n\t }\n\t },\n\t ignore: {\n\t get: function () {\n\t return this._heart.ignore;\n\t }\n\t },\n\t _enqueue: {\n\t value: function _enqueue(payload) {\n\t for (var s in this.stores) {\n\t this.stores[s].send(payload);\n\t }\n\t this._heart.beat();\n\t }\n\t },\n\t addActions: {\n\t value: function addActions(actions) {\n\t this.actions = transpose(actions, intent(this._dispatcher));\n\t }\n\t },\n\t addStores: {\n\t value: function addStores(stores) {\n\t var _this = this;\n\n\t var constants = transpose(this.actions, prefix);\n\n\t this.stores = transpose(stores, function (Store, id) {\n\t return new Store(constants, _this._seed[id], _this);\n\t });\n\t }\n\t },\n\t serialize: {\n\t value: function serialize() {\n\t return transpose(this.stores, function (store) {\n\t return store.serialize();\n\t });\n\t }\n\t }\n\t });\n\n\t return Microcosm;\n\t})();\n\n\tmodule.exports = Microcosm;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tvar _objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; };\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar React = _interopRequire(__webpack_require__(11));\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar Microscope = React.createClass({\n\t displayName: \"Microscope\",\n\n\t mixins: [React.addons.PureRenderMixin],\n\n\t propTypes: {\n\t flux: React.PropTypes.object.isRequired,\n\t watch: React.PropTypes.array.isRequired\n\t },\n\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t element: \"div\"\n\t };\n\t },\n\n\t getInitialState: function getInitialState() {\n\t return this.getState();\n\t },\n\n\t getState: function getState() {\n\t var _props = this.props;\n\t var flux = _props.flux;\n\t var watch = _props.watch;\n\n\t return watch.reduce(function (memo, key) {\n\t memo[key] = flux.stores[key].state;\n\t return memo;\n\t }, {});\n\t },\n\n\t updateState: function updateState() {\n\t this.setState(this.getState());\n\t },\n\n\t componentDidMount: function componentDidMount() {\n\t this.props.flux.listen(this.updateState);\n\t },\n\n\t componentWillUnmount: function componentWillUnmount() {\n\t this.props.flux.ignore(this.updateState);\n\t },\n\n\t render: function render() {\n\t var _this = this;\n\n\t var _props = this.props;\n\t var children = _props.children;\n\t var element = _props.element;\n\t var flux = _props.flux;\n\n\t var other = _objectWithoutProperties(_props, [\"children\", \"element\", \"flux\"]);\n\n\t var members = React.Children.map(children, function (Component) {\n\t return React.addons.cloneWithProps(Component, _extends({ flux: flux }, _this.state));\n\t });\n\n\t return React.createElement(element, other, members);\n\t }\n\t});\n\n\tmodule.exports = Microscope;\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\n\t/**\n\t * Store\n\t * The basic state container for Microcosm. Store observes\n\t * changes, by assignment, to an immutable data structure.\n\t */\n\n\tvar Store = (function () {\n\t function Store(constants, seed) {\n\t _classCallCheck(this, Store);\n\n\t this._tasks = this.register(constants);\n\t this.state = this.getInitialState(seed);\n\t }\n\n\t _createClass(Store, {\n\t getInitialState: {\n\t value: function getInitialState() {}\n\t },\n\t register: {\n\t value: function register() {}\n\t },\n\t all: {\n\t get: function () {\n\t return this.state;\n\t }\n\t },\n\t send: {\n\t value: function send(_ref) {\n\t var type = _ref.type;\n\t var body = _ref.body;\n\n\t if (this._tasks && type in this._tasks) {\n\t this._tasks[type].call(this, body);\n\t }\n\t }\n\t },\n\t toJSON: {\n\t value: function toJSON() {\n\t return this.state;\n\t }\n\t },\n\t serialize: {\n\t value: function serialize() {\n\t return undefined;\n\t }\n\t }\n\t });\n\n\t return Store;\n\t})();\n\n\tmodule.exports = Store;\n\n\t// noop\n\n\t// noop\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\t/**\n\t * Dispatch\n\t * Ensure a given value is a promise, then dispatch out when that\n\t * promise resolves.\n\t */\n\n\tvar promiseWrap = _interopRequire(__webpack_require__(9));\n\n\tmodule.exports = function (dispatcher, type, result) {\n\t return promiseWrap(result).then(function (body) {\n\t dispatcher.dispatch({ type: type, body: body });\n\t return body;\n\t });\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * Heartbeat\n\t * Based on Diode, emits a heartbeat whenever any store state has changed.\n\t * When Stores change, they can use this entity to broadcast\n\t * that state has changed.\n\t *\n\t * See https://github.com/vigetlabs/diode\n\t */\n\n\tmodule.exports = function () {\n\t var _callbacks = [];\n\t var _tick = null;\n\n\t /**\n\t * Callbacks are eventually executed, Heartbeat does not promise\n\t * immediate consistency so that state propagation can be batched\n\t */\n\t var _pump = function _pump() {\n\t /**\n\t * Important: do not cache the length of _callbacks\n\t * in the event a callback causes later subscriptions\n\t * to disappear\n\t */\n\t for (var i = 0; i < _callbacks.length; i++) {\n\t _callbacks[i]();\n\t }\n\t };\n\n\t return {\n\n\t /**\n\t * Given a CALLBACK function, remove it from the Set of callbacks.\n\t * Throws an error if the callback is not included in the Set.\n\t */\n\t ignore: function ignore(callback) {\n\t _callbacks = _callbacks.filter(function (i) {\n\t return i !== callback;\n\t });\n\t },\n\n\t /**\n\t * Given a CALLBACK function, add it to the Set of all callbacks.\n\t */\n\t listen: function listen(callback) {\n\t _callbacks = _callbacks.concat(callback);\n\t },\n\n\t /**\n\t * Trigger every callback in the Set\n\t */\n\t beat: function beat() {\n\t if (_callbacks.length > 0) {\n\t cancelAnimationFrame(_tick);\n\t _tick = requestAnimationFrame(_pump);\n\t }\n\t }\n\n\t };\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\t/**\n\t * Intent\n\t * Generates a function that creates the glue between actions and stores.\n\t */\n\n\tvar dispatch = _interopRequire(__webpack_require__(6));\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar identify = __webpack_require__(2).identify;\n\n\tmodule.exports = function (dispatcher) {\n\t return function (methods, id) {\n\t return transpose(methods, function (method, name) {\n\t var type = identify(id, name);\n\t return function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t return dispatch(dispatcher, type, method.apply(undefined, args));\n\t };\n\t }, {});\n\t };\n\t};\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * PromiseWrap\n\t * Makes sure a given value is always a promise\n\t */\n\n\tmodule.exports = function (value) {\n\t if (value instanceof Promise) {\n\t return value;\n\t } else {\n\t return Promise.resolve(value);\n\t }\n\t};\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = require(\"flux\");\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = require(\"react/addons\");\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** Microcosm.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 31fda76f647d5572d7d2\n **/","/**\n * Microcosm\n * An isomorphic flux implimentation. The strength of Microcosm\n * is that each application is its own fully encapsulated world\n */\n\nexport let Store = require('./Store')\nexport let Microscope = require('./Microscope')\nexport let Microcosm = require('./Microcosm')\n\nexport default Microcosm;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.js\n **/","/**\n * Transpose\n * Reduces over a value, setting the current index/key\n * to the result of a given function.\n *\n * For example:\n * transpose({ foo: 'bar' }, word => word.toUpperCase()) = { foo: 'BAR' }\n *\n */\n\nexport default (entity={}, fn, initial={}) => {\n let keys = Object.keys(entity)\n\n return keys.reduce((memo, key) => {\n memo[key] = fn(entity[key], key)\n return memo\n }, initial)\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transpose.js\n **/","/**\n * Prefix\n * Given an object, return a new object whos keys are prefixed with\n * a given string.\n *\n * This module is responsible for constructing action constants\n */\n\nimport transpose from './transpose'\n\nexport let identify = (str, key) => `${ str }-${ key }`\n\nexport default (obj, str) => {\n return transpose(obj, (value, key) => identify(str, key))\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/prefix.js\n **/","/**\n * Microcosm\n * An isomorphic flux implimentation. The strength of Microcosm\n * is that each application is its own fully encapsulated world\n */\n\nimport Heartbeat from './heartbeat'\nimport intent from './intent'\nimport prefix from './prefix'\nimport transpose from './transpose'\n\nimport { Dispatcher } from 'flux'\n\nexport default class Microcosm {\n\n constructor(seed) {\n this._seed = seed || {}\n this._heart = Heartbeat()\n this._dispatcher = new Dispatcher()\n this._dispatcher.register(this._enqueue.bind(this))\n }\n\n get listen() {\n return this._heart.listen\n }\n\n get ignore() {\n return this._heart.ignore\n }\n\n _enqueue(payload) {\n for (let s in this.stores) {\n this.stores[s].send(payload)\n }\n this._heart.beat()\n }\n\n addActions(actions) {\n this.actions = transpose(actions, intent(this._dispatcher))\n }\n\n addStores(stores) {\n let constants = transpose(this.actions, prefix)\n\n this.stores = transpose(stores, (Store, id) => {\n return new Store(constants, this._seed[id], this)\n })\n }\n\n serialize() {\n return transpose(this.stores, store => store.serialize())\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Microcosm.js\n **/","import React from 'react/addons'\nimport transpose from './transpose'\n\nconst Microscope = React.createClass({\n mixins: [ React.addons.PureRenderMixin ],\n\n propTypes: {\n flux : React.PropTypes.object.isRequired,\n watch : React.PropTypes.array.isRequired\n },\n\n getDefaultProps() {\n return {\n element: 'div'\n }\n },\n\n getInitialState() {\n return this.getState()\n },\n\n getState() {\n const { flux, watch } = this.props\n\n return watch.reduce(function(memo, key) {\n memo[key] = flux.stores[key].state\n return memo\n }, {})\n },\n\n updateState() {\n this.setState(this.getState())\n },\n\n componentDidMount() {\n this.props.flux.listen(this.updateState)\n },\n\n componentWillUnmount() {\n this.props.flux.ignore(this.updateState)\n },\n\n render() {\n const { children, element, flux, ...other } = this.props\n\n const members = React.Children.map(children, Component => {\n return React.addons.cloneWithProps(Component, { flux, ...this.state })\n })\n\n return React.createElement(element, other, members)\n }\n})\n\nexport default Microscope\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Microscope.jsx\n **/","/**\n * Store\n * The basic state container for Microcosm. Store observes\n * changes, by assignment, to an immutable data structure.\n */\n\nexport default class Store {\n\n constructor(constants, seed) {\n this._tasks = this.register(constants)\n this.state = this.getInitialState(seed)\n }\n\n getInitialState() {\n // noop\n }\n\n register() {\n // noop\n }\n\n get all() {\n return this.state\n }\n\n send({ type, body }) {\n if (this._tasks && type in this._tasks) {\n this._tasks[type].call(this, body)\n }\n }\n\n toJSON() {\n return this.state\n }\n\n serialize() {\n return undefined\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Store.js\n **/","/**\n * Dispatch\n * Ensure a given value is a promise, then dispatch out when that\n * promise resolves.\n */\n\nimport promiseWrap from './promiseWrap'\n\nexport default function (dispatcher, type, result) {\n return promiseWrap(result).then(body => {\n dispatcher.dispatch({ type, body })\n return body\n })\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/dispatch.js\n **/","/**\n * Heartbeat\n * Based on Diode, emits a heartbeat whenever any store state has changed.\n * When Stores change, they can use this entity to broadcast\n * that state has changed.\n *\n * See https://github.com/vigetlabs/diode\n */\n\nexport default function() {\n var _callbacks = []\n var _tick = null\n\n /**\n * Callbacks are eventually executed, Heartbeat does not promise\n * immediate consistency so that state propagation can be batched\n */\n var _pump = function() {\n /**\n * Important: do not cache the length of _callbacks\n * in the event a callback causes later subscriptions\n * to disappear\n */\n for (var i = 0; i < _callbacks.length; i++) {\n _callbacks[i]()\n }\n }\n\n return {\n\n /**\n * Given a CALLBACK function, remove it from the Set of callbacks.\n * Throws an error if the callback is not included in the Set.\n */\n ignore(callback) {\n _callbacks = _callbacks.filter(i => i !== callback)\n },\n\n /**\n * Given a CALLBACK function, add it to the Set of all callbacks.\n */\n listen(callback) {\n _callbacks = _callbacks.concat(callback)\n },\n\n /**\n * Trigger every callback in the Set\n */\n beat() {\n if (_callbacks.length > 0) {\n cancelAnimationFrame(_tick)\n _tick = requestAnimationFrame(_pump)\n }\n }\n\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/heartbeat.js\n **/","/**\n * Intent\n * Generates a function that creates the glue between actions and stores.\n */\n\nimport dispatch from './dispatch'\nimport transpose from './transpose'\nimport {identify} from './prefix'\n\nexport default dispatcher => {\n return (methods, id) => {\n return transpose(methods, (method, name) => {\n let type = identify(id, name)\n return (...args) => dispatch(dispatcher, type, method(...args))\n }, {})\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/intent.js\n **/","/**\n * PromiseWrap\n * Makes sure a given value is always a promise\n */\n\nexport default value => {\n if (value instanceof Promise) {\n return value\n } else {\n return Promise.resolve(value)\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/promiseWrap.js\n **/","module.exports = require(\"flux\");\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"flux\"\n ** module id = 10\n ** module chunks = 0\n **/","module.exports = require(\"react/addons\");\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"react/addons\"\n ** module id = 11\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["Microcosm.js","webpack/bootstrap 7c990a2cc8c0cc5272da","./src/index.js","./src/transpose.js","./src/prefix.js","./src/Microcosm.js","./src/Microscope.jsx","./src/Store.js","./src/dispatch.js","./src/heartbeat.js","./src/intent.js","./src/promiseWrap.js","external \"flux\"","external \"react/addons\""],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","Object","defineProperty","value","Store","Microscope","Microcosm","_x","fn","entity","undefined","arguments","initial","keys","reduce","memo","key","_interopRequire","obj","__esModule","transpose","identify","str","_createClass","defineProperties","target","props","prop","configurable","writable","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","Heartbeat","intent","prefix","Dispatcher","seed","this","_seed","_heart","_dispatcher","register","_enqueue","bind","listen","get","ignore","payload","s","stores","send","beat","addActions","actions","addStores","_this","constants","serialize","store","_objectWithoutProperties","i","indexOf","hasOwnProperty","_extends","assign","length","source","React","createClass","displayName","mixins","addons","PureRenderMixin","propTypes","flux","PropTypes","object","isRequired","watch","array","getDefaultProps","element","getInitialState","getState","_props","state","updateState","setState","componentDidMount","componentWillUnmount","render","children","other","members","Children","map","Component","cloneWithProps","createElement","_tasks","all","_ref","type","body","toJSON","promiseWrap","dispatcher","result","then","dispatch","_callbacks","_tick","_pump","callback","filter","concat","cancelAnimationFrame","requestAnimationFrame","methods","method","name","_len","args","Array","_key","apply","Promise","resolve","require"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAH,WACAK,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAA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GAAOnH,UAAU2D,OU3clByD,EAAIC,MAAAF,GAAAG,EAAA,EAAAH,EAAAG,MAAJF,EAAIE,GAAAtH,UAAAsH,EV+cZ,OU/ciBf,GAASH,EAAYJ,EAAMiB,EAAMM,MAAAxH,OAAIqH,aVudzD,SAAS1I,GAEd,YAOAA,GAAOC,QWxeO,SAAAa,GACb,MAAIA,aAAiBgI,SACZhI,EAEAgI,QAAQC,QAAQjI,KX8erB,SAASd,GYvffA,EAAAC,QAAA+I,QAAA,SZ6fM,SAAShJ,Ga7ffA,EAAAC,QAAA+I,QAAA","file":"Microcosm.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * Microcosm\n\t * An isomorphic flux implimentation. The strength of Microcosm\n\t * is that each application is its own fully encapsulated world\n\t */\n\n\tvar Store = __webpack_require__(5);\n\texports.Store = Store;\n\tvar Microscope = __webpack_require__(4);\n\texports.Microscope = Microscope;\n\tvar Microcosm = __webpack_require__(3);\n\n\texports.Microcosm = Microcosm;\n\texports[\"default\"] = Microcosm;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * Transpose\n\t * Reduces over a value, setting the current index/key\n\t * to the result of a given function.\n\t *\n\t * For example:\n\t * transpose({ foo: 'bar' }, word => word.toUpperCase()) = { foo: 'BAR' }\n\t *\n\t */\n\n\tmodule.exports = function (_x, fn) {\n\t var entity = arguments[0] === undefined ? {} : arguments[0];\n\t var initial = arguments[2] === undefined ? {} : arguments[2];\n\n\t var keys = Object.keys(entity);\n\n\t return keys.reduce(function (memo, key) {\n\t memo[key] = fn(entity[key], key);\n\t return memo;\n\t }, initial);\n\t};\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/**\n\t * Prefix\n\t * Given an object, return a new object whos keys are prefixed with\n\t * a given string.\n\t *\n\t * This module is responsible for constructing action constants\n\t */\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar identify = function (str, key) {\n\t return \"\" + str + \"-\" + key;\n\t};\n\n\texports.identify = identify;\n\n\texports[\"default\"] = function (obj, str) {\n\t return transpose(obj, function (value, key) {\n\t return identify(str, key);\n\t });\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\n\t/**\n\t * Microcosm\n\t * An isomorphic flux implimentation. The strength of Microcosm\n\t * is that each application is its own fully encapsulated world\n\t */\n\n\tvar Heartbeat = _interopRequire(__webpack_require__(7));\n\n\tvar intent = _interopRequire(__webpack_require__(8));\n\n\tvar prefix = _interopRequire(__webpack_require__(2));\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar Dispatcher = __webpack_require__(10).Dispatcher;\n\n\tvar Microcosm = (function () {\n\t function Microcosm(seed) {\n\t _classCallCheck(this, Microcosm);\n\n\t this._seed = seed || {};\n\t this._heart = Heartbeat();\n\t this._dispatcher = new Dispatcher();\n\t this._dispatcher.register(this._enqueue.bind(this));\n\t }\n\n\t _createClass(Microcosm, {\n\t listen: {\n\t get: function () {\n\t return this._heart.listen;\n\t }\n\t },\n\t ignore: {\n\t get: function () {\n\t return this._heart.ignore;\n\t }\n\t },\n\t _enqueue: {\n\t value: function _enqueue(payload) {\n\t for (var s in this.stores) {\n\t this.stores[s].send(payload);\n\t }\n\t this._heart.beat();\n\t }\n\t },\n\t addActions: {\n\t value: function addActions(actions) {\n\t this.actions = transpose(actions, intent(this._dispatcher));\n\t }\n\t },\n\t addStores: {\n\t value: function addStores(stores) {\n\t var _this = this;\n\n\t var constants = transpose(this.actions, prefix);\n\n\t this.stores = transpose(stores, function (Store, id) {\n\t return new Store(constants, _this._seed[id], _this);\n\t });\n\t }\n\t },\n\t serialize: {\n\t value: function serialize() {\n\t return transpose(this.stores, function (store) {\n\t return store.serialize();\n\t });\n\t }\n\t }\n\t });\n\n\t return Microcosm;\n\t})();\n\n\tmodule.exports = Microcosm;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\tvar _objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; };\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar React = _interopRequire(__webpack_require__(11));\n\n\tvar Microscope = React.createClass({\n\t displayName: \"Microscope\",\n\n\t mixins: [React.addons.PureRenderMixin],\n\n\t propTypes: {\n\t flux: React.PropTypes.object.isRequired,\n\t watch: React.PropTypes.array.isRequired\n\t },\n\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t element: \"div\"\n\t };\n\t },\n\n\t getInitialState: function getInitialState() {\n\t return this.getState();\n\t },\n\n\t getState: function getState() {\n\t var _props = this.props;\n\t var flux = _props.flux;\n\t var watch = _props.watch;\n\n\t return watch.reduce(function (memo, key) {\n\t memo[key] = flux.stores[key].state;\n\t return memo;\n\t }, {});\n\t },\n\n\t updateState: function updateState() {\n\t this.setState(this.getState());\n\t },\n\n\t componentDidMount: function componentDidMount() {\n\t this.props.flux.listen(this.updateState);\n\t },\n\n\t componentWillUnmount: function componentWillUnmount() {\n\t this.props.flux.ignore(this.updateState);\n\t },\n\n\t render: function render() {\n\t var _this = this;\n\n\t var _props = this.props;\n\t var children = _props.children;\n\t var element = _props.element;\n\t var flux = _props.flux;\n\n\t var other = _objectWithoutProperties(_props, [\"children\", \"element\", \"flux\"]);\n\n\t var members = React.Children.map(children, function (Component) {\n\t return React.addons.cloneWithProps(Component, _extends({ flux: flux }, _this.state));\n\t });\n\n\t return React.createElement(element, other, members);\n\t }\n\t});\n\n\tmodule.exports = Microscope;\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\n\tvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\n\t/**\n\t * Store\n\t * The basic state container for Microcosm. Store observes\n\t * changes, by assignment, to an immutable data structure.\n\t */\n\n\tvar Store = (function () {\n\t function Store(constants, seed) {\n\t _classCallCheck(this, Store);\n\n\t this._tasks = this.register(constants);\n\t this.state = this.getInitialState(seed);\n\t }\n\n\t _createClass(Store, {\n\t getInitialState: {\n\t value: function getInitialState() {}\n\t },\n\t register: {\n\t value: function register() {}\n\t },\n\t all: {\n\t get: function () {\n\t return this.state;\n\t }\n\t },\n\t send: {\n\t value: function send(_ref) {\n\t var type = _ref.type;\n\t var body = _ref.body;\n\n\t if (this._tasks && type in this._tasks) {\n\t this._tasks[type].call(this, body);\n\t }\n\t }\n\t },\n\t toJSON: {\n\t value: function toJSON() {\n\t return this.state;\n\t }\n\t },\n\t serialize: {\n\t value: function serialize() {\n\t return undefined;\n\t }\n\t }\n\t });\n\n\t return Store;\n\t})();\n\n\tmodule.exports = Store;\n\n\t// noop\n\n\t// noop\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\t/**\n\t * Dispatch\n\t * Ensure a given value is a promise, then dispatch out when that\n\t * promise resolves.\n\t */\n\n\tvar promiseWrap = _interopRequire(__webpack_require__(9));\n\n\tmodule.exports = function (dispatcher, type, result) {\n\t return promiseWrap(result).then(function (body) {\n\t dispatcher.dispatch({ type: type, body: body });\n\t return body;\n\t });\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * Heartbeat\n\t * Based on Diode, emits a heartbeat whenever any store state has changed.\n\t * When Stores change, they can use this entity to broadcast\n\t * that state has changed.\n\t *\n\t * See https://github.com/vigetlabs/diode\n\t */\n\n\tmodule.exports = function () {\n\t var _callbacks = [];\n\t var _tick = null;\n\n\t /**\n\t * Callbacks are eventually executed, Heartbeat does not promise\n\t * immediate consistency so that state propagation can be batched\n\t */\n\t var _pump = function _pump() {\n\t /**\n\t * Important: do not cache the length of _callbacks\n\t * in the event a callback causes later subscriptions\n\t * to disappear\n\t */\n\t for (var i = 0; i < _callbacks.length; i++) {\n\t _callbacks[i]();\n\t }\n\t };\n\n\t return {\n\n\t /**\n\t * Given a CALLBACK function, remove it from the Set of callbacks.\n\t * Throws an error if the callback is not included in the Set.\n\t */\n\t ignore: function ignore(callback) {\n\t _callbacks = _callbacks.filter(function (i) {\n\t return i !== callback;\n\t });\n\t },\n\n\t /**\n\t * Given a CALLBACK function, add it to the Set of all callbacks.\n\t */\n\t listen: function listen(callback) {\n\t _callbacks = _callbacks.concat(callback);\n\t },\n\n\t /**\n\t * Trigger every callback in the Set\n\t */\n\t beat: function beat() {\n\t if (_callbacks.length > 0) {\n\t cancelAnimationFrame(_tick);\n\t _tick = requestAnimationFrame(_pump);\n\t }\n\t }\n\n\t };\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tvar _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\n\n\t/**\n\t * Intent\n\t * Generates a function that creates the glue between actions and stores.\n\t */\n\n\tvar dispatch = _interopRequire(__webpack_require__(6));\n\n\tvar transpose = _interopRequire(__webpack_require__(1));\n\n\tvar identify = __webpack_require__(2).identify;\n\n\tmodule.exports = function (dispatcher) {\n\t return function (methods, id) {\n\t return transpose(methods, function (method, name) {\n\t var type = identify(id, name);\n\t return function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t return dispatch(dispatcher, type, method.apply(undefined, args));\n\t };\n\t }, {});\n\t };\n\t};\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\t/**\n\t * PromiseWrap\n\t * Makes sure a given value is always a promise\n\t */\n\n\tmodule.exports = function (value) {\n\t if (value instanceof Promise) {\n\t return value;\n\t } else {\n\t return Promise.resolve(value);\n\t }\n\t};\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = require(\"flux\");\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = require(\"react/addons\");\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** Microcosm.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 7c990a2cc8c0cc5272da\n **/","/**\n * Microcosm\n * An isomorphic flux implimentation. The strength of Microcosm\n * is that each application is its own fully encapsulated world\n */\n\nexport let Store = require('./Store')\nexport let Microscope = require('./Microscope')\nexport let Microcosm = require('./Microcosm')\n\nexport default Microcosm;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.js\n **/","/**\n * Transpose\n * Reduces over a value, setting the current index/key\n * to the result of a given function.\n *\n * For example:\n * transpose({ foo: 'bar' }, word => word.toUpperCase()) = { foo: 'BAR' }\n *\n */\n\nexport default (entity={}, fn, initial={}) => {\n let keys = Object.keys(entity)\n\n return keys.reduce((memo, key) => {\n memo[key] = fn(entity[key], key)\n return memo\n }, initial)\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transpose.js\n **/","/**\n * Prefix\n * Given an object, return a new object whos keys are prefixed with\n * a given string.\n *\n * This module is responsible for constructing action constants\n */\n\nimport transpose from './transpose'\n\nexport let identify = (str, key) => `${ str }-${ key }`\n\nexport default (obj, str) => {\n return transpose(obj, (value, key) => identify(str, key))\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/prefix.js\n **/","/**\n * Microcosm\n * An isomorphic flux implimentation. The strength of Microcosm\n * is that each application is its own fully encapsulated world\n */\n\nimport Heartbeat from './heartbeat'\nimport intent from './intent'\nimport prefix from './prefix'\nimport transpose from './transpose'\n\nimport { Dispatcher } from 'flux'\n\nexport default class Microcosm {\n\n constructor(seed) {\n this._seed = seed || {}\n this._heart = Heartbeat()\n this._dispatcher = new Dispatcher()\n this._dispatcher.register(this._enqueue.bind(this))\n }\n\n get listen() {\n return this._heart.listen\n }\n\n get ignore() {\n return this._heart.ignore\n }\n\n _enqueue(payload) {\n for (let s in this.stores) {\n this.stores[s].send(payload)\n }\n this._heart.beat()\n }\n\n addActions(actions) {\n this.actions = transpose(actions, intent(this._dispatcher))\n }\n\n addStores(stores) {\n let constants = transpose(this.actions, prefix)\n\n this.stores = transpose(stores, (Store, id) => {\n return new Store(constants, this._seed[id], this)\n })\n }\n\n serialize() {\n return transpose(this.stores, store => store.serialize())\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Microcosm.js\n **/","import React from 'react/addons'\n\nconst Microscope = React.createClass({\n mixins: [ React.addons.PureRenderMixin ],\n\n propTypes: {\n flux : React.PropTypes.object.isRequired,\n watch : React.PropTypes.array.isRequired\n },\n\n getDefaultProps() {\n return {\n element: 'div'\n }\n },\n\n getInitialState() {\n return this.getState()\n },\n\n getState() {\n const { flux, watch } = this.props\n\n return watch.reduce(function(memo, key) {\n memo[key] = flux.stores[key].state\n return memo\n }, {})\n },\n\n updateState() {\n this.setState(this.getState())\n },\n\n componentDidMount() {\n this.props.flux.listen(this.updateState)\n },\n\n componentWillUnmount() {\n this.props.flux.ignore(this.updateState)\n },\n\n render() {\n const { children, element, flux, ...other } = this.props\n\n const members = React.Children.map(children, Component => {\n return React.addons.cloneWithProps(Component, { flux, ...this.state })\n })\n\n return React.createElement(element, other, members)\n }\n})\n\nexport default Microscope\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Microscope.jsx\n **/","/**\n * Store\n * The basic state container for Microcosm. Store observes\n * changes, by assignment, to an immutable data structure.\n */\n\nexport default class Store {\n\n constructor(constants, seed) {\n this._tasks = this.register(constants)\n this.state = this.getInitialState(seed)\n }\n\n getInitialState() {\n // noop\n }\n\n register() {\n // noop\n }\n\n get all() {\n return this.state\n }\n\n send({ type, body }) {\n if (this._tasks && type in this._tasks) {\n this._tasks[type].call(this, body)\n }\n }\n\n toJSON() {\n return this.state\n }\n\n serialize() {\n return undefined\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Store.js\n **/","/**\n * Dispatch\n * Ensure a given value is a promise, then dispatch out when that\n * promise resolves.\n */\n\nimport promiseWrap from './promiseWrap'\n\nexport default function (dispatcher, type, result) {\n return promiseWrap(result).then(body => {\n dispatcher.dispatch({ type, body })\n return body\n })\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/dispatch.js\n **/","/**\n * Heartbeat\n * Based on Diode, emits a heartbeat whenever any store state has changed.\n * When Stores change, they can use this entity to broadcast\n * that state has changed.\n *\n * See https://github.com/vigetlabs/diode\n */\n\nexport default function() {\n var _callbacks = []\n var _tick = null\n\n /**\n * Callbacks are eventually executed, Heartbeat does not promise\n * immediate consistency so that state propagation can be batched\n */\n var _pump = function() {\n /**\n * Important: do not cache the length of _callbacks\n * in the event a callback causes later subscriptions\n * to disappear\n */\n for (var i = 0; i < _callbacks.length; i++) {\n _callbacks[i]()\n }\n }\n\n return {\n\n /**\n * Given a CALLBACK function, remove it from the Set of callbacks.\n * Throws an error if the callback is not included in the Set.\n */\n ignore(callback) {\n _callbacks = _callbacks.filter(i => i !== callback)\n },\n\n /**\n * Given a CALLBACK function, add it to the Set of all callbacks.\n */\n listen(callback) {\n _callbacks = _callbacks.concat(callback)\n },\n\n /**\n * Trigger every callback in the Set\n */\n beat() {\n if (_callbacks.length > 0) {\n cancelAnimationFrame(_tick)\n _tick = requestAnimationFrame(_pump)\n }\n }\n\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/heartbeat.js\n **/","/**\n * Intent\n * Generates a function that creates the glue between actions and stores.\n */\n\nimport dispatch from './dispatch'\nimport transpose from './transpose'\nimport {identify} from './prefix'\n\nexport default dispatcher => {\n return (methods, id) => {\n return transpose(methods, (method, name) => {\n let type = identify(id, name)\n return (...args) => dispatch(dispatcher, type, method(...args))\n }, {})\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/intent.js\n **/","/**\n * PromiseWrap\n * Makes sure a given value is always a promise\n */\n\nexport default value => {\n if (value instanceof Promise) {\n return value\n } else {\n return Promise.resolve(value)\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/promiseWrap.js\n **/","module.exports = require(\"flux\");\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"flux\"\n ** module id = 10\n ** module chunks = 0\n **/","module.exports = require(\"react/addons\");\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"react/addons\"\n ** module id = 11\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/src/Microscope.jsx b/src/Microscope.jsx index aee3048b..18939736 100644 --- a/src/Microscope.jsx +++ b/src/Microscope.jsx @@ -1,5 +1,4 @@ -import React from 'react/addons' -import transpose from './transpose' +import React from 'react/addons' const Microscope = React.createClass({ mixins: [ React.addons.PureRenderMixin ],