{"_id":"@modular-toolkit/bricks","_rev":"30-bc192af66fa397bd5ccd6061f7cf8238","name":"@modular-toolkit/bricks","dist-tags":{"latest":"1.2.2","alpha":"1.1.0-alpha.3","beta":"2.0.0-beta.2"},"versions":{"1.0.0":{"name":"@modular-toolkit/bricks","version":"1.0.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.0"},"peerDependencies":{"redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"9aa286ed616144d71dcdf43220d9c36eb5cfbc66","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.0.0.tgz","_id":"@modular-toolkit/bricks@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-9G3Ae9YXY2kXJIVVJ2VVKEll4c0Log7AhKTGJ2iPmnr4XtbpzOcamUQcTeCcy1lzwo3GHeNmJRjY5JhVRkBV/Q==","shasum":"06479a83d5f282d13210881634201cded4f91ba8","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.0.0.tgz","fileCount":29,"unpackedSize":64646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbzv5QCRA9TVsSAnZWagAAWnYP/1E+VRP0ygK1ipN6pXaj\nNujbFyN0+5LubzldUctoHUzmCXSHtvwfa+UHneStacRQlb/wwECq52wvemnJ\nq3uT9YbgC3B5Ib9zlAnH5KKKTT8h1nXOyccbOrkOvYyKZ4Zj9x3S9/uHqMXW\nRFNBuk5euW5QgP0qu/oOge804QpFqkc2zOPfJ3wvhwqAYh6bSG7vkbQlBCmS\nbT9h+KlZ0PHEtAFfO+I/J0tDuLD6ydcwvMf0W/fz/pGv3YNWtdQ/1W/ZCHGS\nogvyf0LsZG1s56byfSHR18rRg3GtDPCoH3An8HgspyK+gS6GSgF2moGqCY35\n6xi5jvFaPQi1JKA0wRTcZKPD1+VxzgY1vWKfJFKivw4uD/ql10jiaDbbVcNO\nBzMDGHbK8j94X5FJ+ruIe1FyRnFWQz21ROn+H306gDCFtsQfbNzOcHVHv8A6\n8KYgyT+VdtedwEelWFGhq7ol8TyJVnUTLp8df1p+TTBYiZ6ZXQw7yHeM4hgU\noI0l7WRvsBwYgmG+unGhXxYZWwhd87qSdhA/1R/ZOP3Kz18WqmYInwiEDeMj\nq6TG4qvzkr/aoc02JXJVJP/OPRvl/EQM9dgyiOfUcM8UoWzeDgK0ixsDmCqo\n4GRCpJ63YDRlyv1faLifrx2FBT+rNcp1QFgKGFj0SEjL9PKWZKTQvdgDOD32\n9twA\r\n=8GMz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCj+W3nRuhru7sqgh7J7WcryiBsNlKZ0rbdaU69bLgEPwIhAPxseekk28C4s7whxiMdLl7BBf+SBF+wnAFY+U0k2f97"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.0.0_1540292175672_0.3415194424030292"},"_hasShrinkwrap":false},"1.0.1":{"name":"@modular-toolkit/bricks","version":"1.0.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.1"},"peerDependencies":{"redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"dc11b1034700fd6f3f91fb13b02ceae4860f252f","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.0.1.tgz","_id":"@modular-toolkit/bricks@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-XD7FBWSR7ogkqDcjGNxVGhO5sTn6oIomXjMTATwg79UyfvuaOBTG74H8S7NeyDdguQ3xFNaYWzts9vklU285Hg==","shasum":"9fec575b97d3ffd5ba5de9ae053b2dda13373f1f","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.0.1.tgz","fileCount":29,"unpackedSize":64637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0XPdCRA9TVsSAnZWagAAhwwP/ROEIJgYlaAoOBuxvZ1/\nZ9SACDIexMrUHP4teeOpes24jN0JUixqTv2GF/L89vDwdp4H7ARLyschVw1B\nUhceVWxNqXOviYf7pmad6ufSiiQwwDegYWDiPnkVWb3Y/o7E/N703SH+QSVL\nrwHyQWoPjZ7adYvHlTojup0yUxTXvWuOx6lGBViBSoUKGJ2tqGuPSiZdcuaQ\nxV08XYTmTZkIkCsHh539dXRExDeh6TJm46q5OLi0Porm21N0tmNG8W3b1PJ5\nwicsX9VMKFynOgvRQ9eiuhesQ4KzTvyEzETK4gXI4MQUB8DoRr5xdUlkWdUd\n7DSRc9N4vBRvAMTXNMt1jQZxCaqchzYfTgUL+Hxah0WStyQXuOE3THOjMrB7\nPyIn+AVeBmQ4FDL92Ize61xlUoCCoqajYxtpdtqTYTfCmLQSufx3z1kFVJ1A\nQumuLDzdLCQ+wDJXttBDuRzAa+NExsyS3/WisLSQTqaNJabGGCyj99OAm1S0\nbH8d6IxF57PQj/nG+6NPlKmPcFouWhOvwC4qya7gAVb8cAGeVQebeqVGEnrL\niKI6hybFEa0uAO2yk/Bzuk7vZDJAQY4UrlgU8/xPALd2E6dtMoUPTTVk8krZ\nPPsIDPyo8xSfuSJP54QFwWlZPYn7vnSfcwdYTHsnebCvBwLWs+HzQ76rhH8F\nNbzv\r\n=Rk1Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMjwfRl+9SFZ+qaxCacXs/utNjsyREIHMQ1gnCrXjhSQIgLehm2zUYN793VEh5F5S051P5oKqz2vB9ldqbubH3/LQ="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.0.1_1540453340808_0.1461419711421148"},"_hasShrinkwrap":false},"1.1.0-alpha.0":{"name":"@modular-toolkit/bricks","version":"1.1.0-alpha.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.1"},"peerDependencies":{"react":">=16.2.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"6c17ed42206d12e25315120783c9fb2db9b11758","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.0-alpha.0.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the *esnext* version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from \nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of *combineReducers* if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using *combineReducers* from the Redux library.\nUse *combineReducers* from *modular-tookkit* instead ([see above](#combinereducers)).\n\n## Change Log\n\n* See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n* See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n* Includes code taken from [Redux](https://redux.js.org) (*combineReducers*)<br>\n  [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n  Copyright © 2015–present Dan Abramov\n* The *BrickManager* module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n  [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n  Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.0-alpha.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-scSlBD1huuorfI4bPFqoCvvYWxk2QwNdEtoWZ868YrNhnmIEslQKrDlEcohjTVveJFd+UmYGAXOhEDDUi2/bVQ==","shasum":"2d1bcc3d9c7b2d4bf22f30a19b3d24eed1af831b","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0-alpha.0.tgz","fileCount":32,"unpackedSize":67564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0atICRA9TVsSAnZWagAAJ5kQAIEh2MAv5apzGW16fvxK\ngC3oZdWNDCN/5tXY4Y7JzjWJwm7kdnxlsJJkF4Uy2HZWTamNTphHA4p2vjtz\nl2QQ7v6yfJpmJZX5D+Rj6IegSifLDEfHKUiaODvyRDBiL2TYeOkq5LCsXnPV\nnaYHJFefU70zJsYkPqYI9NAtfvZ9w9VDR++ClelCpzI3SVGFaL4y24oennSN\n7pwTXukpUsZsdvtq2ZAnXdGKPERpiPTOZJ4CKz8B8rqQDvxpyvA21sRSTHsx\nG0zfBNbbBI2T/ZPOEx54WELJPBlQ+NvnX6l6GDxpiVyxKh5gxFpIGAN64LV3\nnvHzbTUD0JNuVDGdZNuHYzB+slwTMd9JEji7AnhXwm3vy4ysoKboTN1C/2/4\nfD1GXMna7SqlR4p1w/AyHqJLFzH0uqwGkWsG/OC/qbD6OdUSnLxPsiQSC8ft\nIeTud7VmLrlhq/l5ujdNZ1YAD+KwoNcI/s8IU72eXn5wrFfh1NEb5aMnBPSO\nfezcqY9K/pOWF7Pc5e89CA7aKK0IKz3GS6vt7BJ0Y6AJydNbICnMG/aMf4IE\nz0MIR3oyhy3XfN04334KBEOtjIZem0anSiByWdwuIiF9HGToABpcMazwI9Uq\nUd+LpVp8MzRrm75LxaKpuevqZaIuKs4USvq58W+PEop95JtSaujce8thM2XQ\nTHmj\r\n=IFFZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5Ifa7/h9VgRItJTO3RXzBIzICC4Z0ui+Sqd//pP0dhQIhANTgLZp0pL1/f8okbcAcw/T1MSiZQTxgy06Eu+332OVX"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0-alpha.0_1540467527474_0.7252779672247465"},"_hasShrinkwrap":false},"1.1.0-alpha.1":{"name":"@modular-toolkit/bricks","version":"1.1.0-alpha.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.1"},"peerDependencies":{"react":">=16.2.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the *esnext* version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from \nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of *combineReducers* if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using *combineReducers* from the Redux library.\nUse *combineReducers* from *modular-tookkit* instead ([see above](#combinereducers)).\n\n## Change Log\n\n* See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n* See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n* Includes code taken from [Redux](https://redux.js.org) (*combineReducers*)<br>\n  [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n  Copyright © 2015–present Dan Abramov\n* The *BrickManager* module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n  [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n  Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.0-alpha.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-O63v8nR1lSvDVMZmrIQDMhwXJr7SQhju3igP7d4mpS6uB/X0EZEl6hqeYlMpvo26a0ucdDJ/iqVdfLHnylxJzw==","shasum":"aa268fe0261bf3ba114f4123a020c1946ea63deb","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0-alpha.1.tgz","fileCount":32,"unpackedSize":67505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0bt0CRA9TVsSAnZWagAAZbcP/0yUipd5H/BQkireB/Qs\nfSpwqMh/WhuDxH8WU9UV18C5P16hWPVk4xJqmmbzbnIch6OsPQeaCjqClIBi\nro1wQvLaWCdE/o52qRZTaS7l2bjkWZ9bXmmgol9JDisENlEWr1Vdd5FHe7eL\nW/0fZikBERe2gAZFgyi/+8yPcjAts+QTiPLDAvKr6NWdFoVjaKD059RUGDh9\nQGG/FShAxF79moOXitMPUgHbdA4fq9wQpuDD6+wvgR0xDG5Z5RnwYdeXQV0y\nhvdDVluINJ9XzYcyIQTtI99iRzHU/6c+MtvSTw9o32xJ5erCMPF5xELguUUQ\nevlmCHUFdd5bpk2Hp3IqvhZlbiGLNzNFQx7xgjIVNRi4h/S78s2YgUaKC1x7\nHjj7HW8UvDTAv3lnTtOmgNZ6A+aOhqfxL1534vKCg+ed0EhpNaUm/YD0GE3p\n2JTr/ulRA8U/KFzLT/RdzYKIHzjBFfqGPnqUki89YH3U1J57a8k4S3LCPYOm\nVjGSpnoifbEN8vp4dS1gSLZjpfUa42W3Y/TEJKfO+5/em4LchUmfKJodSzRP\nnZyu/rA/Z08wl6p+X5Lc+pb5ZChbzd5uPlhMptCp0GIYDzoFiShkUycGIe7S\nH4h74f3GVHEi5K1Tvmmo2hD37M7taCWuhEQeRPcEhanHZ5v6rmED5WVJbLzV\nEfFH\r\n=Ssf6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChOziQyvZlOAHlcfXs/LDREsBNsmilMcVKdYXM88J4kQIhAPGTuThGFxN790KLGYyC89/caRI2MGJp9Zu+AubKhWuU"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0-alpha.1_1540471667842_0.46874800812638995"},"_hasShrinkwrap":false},"1.1.0-alpha.2":{"name":"@modular-toolkit/bricks","version":"1.1.0-alpha.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.1"},"peerDependencies":{"react":">=16.2.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the *esnext* version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from \nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of *combineReducers* if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using *combineReducers* from the Redux library.\nUse *combineReducers* from *modular-tookkit* instead ([see above](#combinereducers)).\n\n## Change Log\n\n* See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n* See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n* Includes code taken from [Redux](https://redux.js.org) (*combineReducers*)<br>\n  [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n  Copyright © 2015–present Dan Abramov\n* The *BrickManager* module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n  [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n  Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.0-alpha.2","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-6SWQjkdFkHYyZOLq4xE0KOGz6GHQ6p76THw3n3oLGPxazY5QvBZVOMQNNAwqvsJCNG+rffJ9wL0EwqlFZphxJQ==","shasum":"d41332252f8a6369b6d5c6d96ad8ad76365144d4","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0-alpha.2.tgz","fileCount":32,"unpackedSize":67503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0b6xCRA9TVsSAnZWagAAZo4QAJPZRFHhFym7qrkfrmso\n29wYDRpapegi7+69WlEQnPBYzWlnECBN6bCG9tQ22cy6NhsW73y62ojbDv7W\nNEIeoGEVCZf7j2SCtyGdvchrym0DIp2gMPWxPNqSOCU1pzps9N8NHPilWzLU\ncWYUjUdnlFPMQoS9PvLTb+8ku5RZI1+vRap38FCHILVH5lAhT6k4qxE+hmd1\nFnSwJ1ygUIQvFtVMB1x3ZeGYG/mg2OScTAJBTE2CnEQmTE+ZBII39qXVzBcj\nNbnFRkdG7+Y97h91QhoQN7T0gOjg3L7lPmrm0gLO28Z4TjqNrDoHW7uJMVjI\nPz0nF5eaA2sgiS7QaZLRXaeHWRe0K94oAWHjpndSODNalLZHtPhxQVKT0a+4\nVwDH6WfFe5nyytaOwOVkIKMm93KYbp66/Ym7PP0fEigMqOO0xxAo6FZN7CML\nlOR5+veAklxX6sm76NdFqb4BpWGg6TH9qRKJ6y2dj9zy3kHCyMRWAL29aZis\nELTId4hdwgUcjKh/k2Naee69iCNzMNpowjuit6isq9nazZvQvAyUBr8Mf2yr\nLWBHzBJnA+H41iwhv2crQ6k6rjUfh3cLRKWWeh75dqOlJzpItlMhYjjcayoZ\njNxFpXsxXf1DViWAospzpOypuDK7o0WF/1IN1vfjsVhKfnZq3FfxBuhG8ko0\n1Oqt\r\n=6xv+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsD33kfttFnrZU/6zcGBkmP26gmNmsOzf55CAGWKNCtAiBcCEUNFw5JlaloPWnAPuHxDJMpNlyywdtSXXLMHrKxiA=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0-alpha.2_1540472497215_0.9846112185046594"},"_hasShrinkwrap":false},"1.1.0-alpha.3":{"name":"@modular-toolkit/bricks","version":"1.1.0-alpha.3","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.1"},"peerDependencies":{"react":">=16.2.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the *esnext* version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from \nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of *combineReducers* if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using *combineReducers* from the Redux library.\nUse *combineReducers* from *modular-tookkit* instead ([see above](#combinereducers)).\n\n## Change Log\n\n* See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n* See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n* Includes code taken from [Redux](https://redux.js.org) (*combineReducers*)<br>\n  [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n  Copyright © 2015–present Dan Abramov\n* The *BrickManager* module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n  [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n  Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.0-alpha.3","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-WxEIWYGRQpuwMbTsiPfQwr8nllogMSXcxJzSQIsDPjP/nraJfR4qjw39FbmOnkCeSsqKkP6tHao9hEmfvOjdFA==","shasum":"4a6923a7669e945568db8cee72cb011e9933783c","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0-alpha.3.tgz","fileCount":33,"unpackedSize":68119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb1MInCRA9TVsSAnZWagAAexgP/1/c12yzutlUByUE5qwB\nWuWqUW7hhNcBfKrHqqiMs3y0D0ospsRH8MGCkX15+Ue/0fckc5EIryUNNjlX\nzytp1vxgvg7QHhPnDnYp9/TsDhe0LrQ0jj6PUtbyRhy4oPY6qa5EXhKhEV/V\niR1YHl5DUXH1ABYiB/tMhbciMMjZOIUOAPJn3XcHPCFZg4mbyEPklykj+WFm\nEltrsj9eL1bt8TKD/5tQMpobqO6EYVB3XLE4DiDODFxyTCdRqNx7iO++Kyin\nBNG2f4w8mB6RkcPozi3oSzOmBCsFEJvo0BiFshqyms7vdHU8kqTCodHaZ+Nd\nDwjyQsSS0FFgpnRWHkwO3jy/GcFNf/F3dCVhWJyua3R6RQRYEOxGS7s6gktr\n7Ni/FcdawOEQ4dVYM9ghMG1eMtntdDkYbAjyKMUEaHaVWRIS4q1mfipFqpR7\nXz79nyjt7TJbFxniAxZLERk7S08p1FKM9NCOroFGHsLjroxOQkh/RSi1L0f7\nqYoXnxf/vC3xjEiyTB5a5CG2QhAjd4p6stNFdF5YGd/UDqMfLvqwKGORzEf7\n75ImJYV5voDWCgV5NtRmSpVmaxtIjsem2dtPCznSISZ6t6+7onuga5W5phfO\ni/NIVsSNDwWCJSBNFOv/7HW1ffelkN6ooYRpPng0EB+5BQeSMAKpstEV6eY7\nNHKX\r\n=zADV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8aHQz/ltlBXq10eOkBdvokDp+8YVgxtzwqVn8669IcwIhANzhizQlHckI9498atNI2JdTsUL5aGMbN2Jx8AwG7iF4"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0-alpha.3_1540669990977_0.011518578273312263"},"_hasShrinkwrap":false},"1.0.2":{"name":"@modular-toolkit/bricks","version":"1.0.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"131c54e0ecc4b0f9e39cb31d0d0b376f5a1e6995","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.0.2.tgz","_id":"@modular-toolkit/bricks@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-Ho9SCrv+gTk+pzvWKCOKRB53mDSYwuQeWKyP2rdtUPGom/bdjHNDbKHTRGX7/nF3hZbm+T5umdmwH06Po7KHQw==","shasum":"b7f552001f3ceed5487e66144a2bcacb0df56f18","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.0.2.tgz","fileCount":29,"unpackedSize":43904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2YAeCRA9TVsSAnZWagAAvgwP/iv4UHm0SnzD9hc4Eqzm\nvy9OxzaxdT1V5+utxAJQNIOPgoztFP/h/i4i8twtHFv0uyD7rL2kUUF+c+ch\nL8SydVpECZck1+dvQdb0z9AKqIiQdLzEl3aDhQHaQOgtcUlY+RJ61cO9MS5E\n07AxboaXdQYZNLhxHlkFRF1oFsVzMpRml72Q3ZBCQW9EM376mE8/81IdfMyT\nlMS5lUiY8tzOIWEoKinZN0GLjpDCPz+QuKp7/W9gufLsTCoMBFMEYYBxg6Ly\n+JSYnLk60/wNHsOhw1aqaWwrO/pgirkJgcWbW0YCBnJrqPH38jEJ+jO+pNsA\nb7rchD8FyUziN8VzmsGLV9FuQ4xi+T7mClpL0oWm4v2W4WkD6OjqqZwv1/jM\nxg9jeZN4Aoa3iP6PSEN5ZeHxMyTO4xJH4NR+2JmvDXnsRvGJ1vViJfeStoc4\n9aEb7uYct7GM4sQTYZ2M9sIDPP+mGwsAUYUyeQ49JwVca4eda0FNABoa70Ue\n9CCrAupHICf+ETqSfauQc9V9jbcAcCMgMjZFkz2n5WmC4cFUty/2UwcmVdjg\nbE9bNEDV8Ud5Y7tU2wFh3UGicWpDBAyE4NB8fWfVLrZEsSYqMrS0KO48yZ1M\na8UxwZeVzVL99XsTKsSbjzpAba6mto73/utpW2PU/8lcBzYGB+VKnFujDpte\n9zl1\r\n=9PO0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9fPlYwIKr2PcD+4+CslIU7EE61HvtnDc6x9M1yHoQgAIhAPZNrnT+hcJOL7Rw+gQt6e/X2bFlrC5RrM8dv1YzRDzp"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.0.2_1540980766396_0.14370603075278487"},"_hasShrinkwrap":false},"1.1.0-beta.0":{"name":"@modular-toolkit/bricks","version":"1.1.0-beta.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"3b4a98c1a87a1e7dcdb65f302e7210309e1f1f7b","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.0-beta.0.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.0-beta.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-pVIaAo4flSLfgwdsdzbKLIJfBEwEWTRrW4lKiDea+Njn7mwp/hhCSAlFfekDoze+1IiRHei00u4nFLf2kSScEQ==","shasum":"7e6fd460c0b70d44711fc6a6c9eba5bcb9d45988","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0-beta.0.tgz","fileCount":43,"unpackedSize":63894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2YKYCRA9TVsSAnZWagAA3g8P/RLSzareVZPHqOzK0mqr\nRQ5Ip41o+7Dv4HBI0LSJDfE6Wq8og+wwjJemQ8/E93TSzENEMl0LaRe4o+yV\n32YyWXAJwxQ0LGDCOpE+sDItvfEHC2dJhv73X/w8NpO2BEYI7osAETTPj+Zm\nyPxjl+Gdu0JEJ8OIYaeRVaQfAT4q9SUwAq4dqFlQ/N89pml5AU8qsToSNwr5\nrwWmSXk/b9QvbzOsZLjVp+EL5e0VppvrR0ueUPikjsq/ycZ1G78FE8QSJlza\nU41zwlEdYFyvdBqXdSODfvwBKdUdRHlfzGas7BovfT/nZn/Y2BMMPmHH5G8V\nRgrgGWWSJ29KTRA7TPB0omLgSFuH58UaQ8D9EjN/+AigmGBF/1ra6acEFxXf\nuNzeCKA77RCSIXCtITb8jvlMYgpeA/RNc/i1iznuNGe0ZHPc/Wg3Fgh5nmQ1\nPDBf18isdqwL0vKy9dqxyyRV95nbIzHFD+l6Q1sFKNLHHGqW9rJxU5QNDzrh\nJTF0N/oQDZ9fahDrrFNI6CbWc/FGwtZ7Hbk9OTpozMGD7czzwNYPuSgqWtYN\ngx/JoAWCsLLQ8Jw/KP+2c8bJ4bU0MsdON+CTjMXTYNqQWmdOtk73ZgWlKip3\n8+Gxg7Yh64EYhga81rBaK1geT9j5MnFFZa3mu/c5osKolWgOnjwP4UtqDsy1\nsO7L\r\n=DTCq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYd+C4yvWLCJjpedhSs33vcjO3MV4R0TQz+OuOYN3LlAiA5BikesLhMvQD+OoUwJ/IJoIkdrNUvyPsh7L87bXui/w=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0-beta.0_1540981399551_0.2758107056935657"},"_hasShrinkwrap":false},"1.1.0":{"name":"@modular-toolkit/bricks","version":"1.1.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"55fafb2c3b90fe02f3ea9d02d38fa7ebe2346476","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.0.tgz","_id":"@modular-toolkit/bricks@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-cS+NiNXElrP/cGIHaOWaISafISPkVfUZWq0COUdOtff0sCjZzWnbLwHirPq9mv4MAwtPN/SHM4b76la3zwR/BA==","shasum":"c9072ee92ddabb0abea454810dc8c0b3fc8bed78","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.0.tgz","fileCount":43,"unpackedSize":63887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2rdrCRA9TVsSAnZWagAAp6YP/3/bfGuJ3AFf2n+wZwPH\nxDdbFCJcuLloRFzqXNJcNVgFVOrWISf0JzyQhPMuvwzcMbKb1ub870hWAi10\nxEyhIXnvoJeqDh21BT7VtdTH8dynDFHX9n01aCVzlW7opzmj9xr3163IqTqs\nOPX4WV87qS0YngsGiLvCx7OdS6VklWKgy4XjQAmF3alVd4dfcuVOigq969Mh\n851ckn6Wu0uqK4JLR/Px9l/AuFjX6npIwlG5r7z98aR+5QFlenvf7FlDe6Uv\nSSEQNNDOWxyZ51TD+JkOWjjOTXQQk0msT3eVJv0NEfNXNEn6c2PN0/lbmiU7\n5KheZOVz+djAN596GWaQCJZ2addvGdj3Kw9L3v8EjT3ZwlVmqlEP2xl77yUu\nw+66DmD09m/pplmPEEUyaYaXc1gFSKY3vqy77G0cmPrijC3vD5xMd5PJdNLq\nteWIYwfb57j6EyOts7UEz2KG0jwmn//80+cT2scw6a7mKSydgFwIzzAQwEoA\n+yH3mby37FrAgA2urd+/F1t26/mj8GZZ7yq7ET0s6PXzUYDF1GvhdxLHRH3w\n3+PFFTklUSQKJujnyjCzi6S0bNkdzWbRL6lGYgg7O00N81AK7FIpdtgFkLr7\nnj4faH3atjxcxwTEDIMjeYtadZfg+1xbryJXGBFlRt8qn5p6Ub04YVx1S3rK\nGK8l\r\n=DjJU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlnrf6J6tHADblI+zekAW9HDrrX9OSZurcIc5lh8LFMAiBh6OPIZgr1O1ObQzY2N/x1dOXsyoV3huFwx4pEmc35VA=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.0_1541060458151_0.5640443705106086"},"_hasShrinkwrap":false},"1.1.1":{"name":"@modular-toolkit/bricks","version":"1.1.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"77d70c2717befd91bc82a7222ae7022e3b2749c2","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.1.tgz","_id":"@modular-toolkit/bricks@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-saUOv93uqUQWIfwFiVbmfBBfdLyuHBvZRyX3sP/bf2xxUoikDlno+LiDADeiIu1TwCn3Ow9BwiGwilNDIJHLIQ==","shasum":"fc719de82293f1eb8118b861210b700b954ec5c7","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.1.tgz","fileCount":43,"unpackedSize":65907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb68a0CRA9TVsSAnZWagAARJ8P/j8yO1MLEwRyW4oz9YK/\nxSSOe8NZi36x1mWq+P/Jn9LkhFxw1IFq7sZs68OYCBa8gYDYDiZF+9rTfEqo\nZ6w20y/rYOp1Yhg80YpQRxpmrCuWcfTrIngyFhlYBwSBRaXiLeE4YbZfETH8\nT8tdts2DJaDyVoCL5erGauWfSB0wPxqRjrok2Ad44bgLBG+7FW4dap9c5Plj\nVjOmFS2qcD9CRrDfpx7D5Hxin8qUczu1Mb9ENv230jxPQ5trqu/XGGk9p23l\n+0EXLC4gImmNoNMs5PRWCQWJfnSx52huRmxd9ofpDBIty34KU7/EYvdO5Pss\n5ZGL5A8j0FJ3MeSxpHIg7pCjNhFJOOCI1iH7F4cFcJrYQUjK/adD0Y21bYBM\nBXEnWn6WnHpyF5XuGs+wxBJcLlEHPvCgAvO4qSSVj571xgTsw5fcoa4DMH+x\nHiDsVy9DuCau/PeLAqarFcD8TyrjSwDL5+yJDkj3SqoNHitKEHMr1Uh8h+89\nC7iO+1xsvc0OqPqo9JHZ8C+soyqUUEah+O9u80LmC/Muqg231O+JlmhTKCj5\nimNQS4xoM+JzCQ0EWgYIrkpn6nZJ7kM8tfFGV3fsJqZBXWHgCCNGML8+8xqZ\nvGx7KNBhJPPUicKWMnjOXuSmN0kHuvHK4tvfynU+NF5lQdVV49Tj7AB3548n\nEUwd\r\n=mRzu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETsLFzMiiHluU/4XE70iqzRxVwZ0zXqM9FFFnDZLChPAiASAEzd0/iY8gg5ecidkGm6tYy2iMnt2rVwZuPzWiWNyQ=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.1_1542178483619_0.48885765516486024"},"_hasShrinkwrap":false},"1.1.2":{"name":"@modular-toolkit/bricks","version":"1.1.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"7389ddac3ed4cc7fdbcc97ff3706e0a8ee892d91","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.2.tgz","_id":"@modular-toolkit/bricks@1.1.2","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-H0i28s0IEEeshsguIGvVqEmAnmpU1J0huqJXHZE/Cs1J9bmMwSrWRaL89JxcohRROU1B6Jr5ISk9pstg5lDdVQ==","shasum":"433a418dcc27afe9ebabdfe9307a369afb73f91a","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.2.tgz","fileCount":43,"unpackedSize":66026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb68coCRA9TVsSAnZWagAA9xIP/0Su1hxIyjqgVshB/2Yz\neTGFXo9RYsbZ5UE8f5DCjUVPuQNk3hcOwWdv8qBCA1l3Ah/dw+EVpqHS6pfb\n0ilxULHX1q4LAvzv5uOx2HUodu8AxXAfu3t8j5czLTErFOq0iVDJfqnHyogx\neJj2IeMmSDITD9ooPaNej6MOm2ZPGG1Dc9hxsYT+TgNCTjzjgg1Vl0IrU2RJ\nV5JeStmADi6bTFvsyA77w8O19oIXB8KssiP84hJd6tjKfhr5+0jez5REIczy\n2Uez4tmo0JvXliOTw09gDkugJbn+dFVxwMNlI9fcuGJrx6nGfvDSxk9ZW9pv\nA6fdnOkUCUTEnNfx0K/xxYo1gxm8m5QB+qdQmyD+Y1tm2yz4UM3qK7Xm53Hu\nnbZ8wffZqoMJaAqU3EOt6nFXCBaHV4zKP88mwKZreMjjk/ImV+jZgaoygxQ6\n5BSa/F67gKDLSc07Gcx51BIsI2d8T7oGu58yIVl9TJgjWXGGnueVGxNWrDQo\no0KPgu4PqWPalFqUP6/y+/w8XiEUR7LGd5I/1KW/xSp7vhpSRtO46SdN0t/l\nIgsIdEQ/jRJJlCyKXZSuFf6MRuq8FOfgoL3a4q3G94TJP6/kk5pyz0twE3TH\nvj0AuJVAVSDpzMUvuSpHtKZwgFlAOGvtfME/mMvAf3MzX5CVrCJIAXiY/BU4\nxj2p\r\n=opEC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLk/8NhYkhX1T8czjB16fsKz1QShfzIhzukNLDxqtprwIhAKlAWNycPoskcmW5l0NmTTEIbnpdaljfOD8aq0oa4w3M"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.2_1542178599853_0.15369175274742153"},"_hasShrinkwrap":false},"1.1.3-beta.0":{"name":"@modular-toolkit/bricks","version":"1.1.3-beta.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"4a98ab04a821b543fb40dcb576a0693e4ecdd207","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.3-beta.0.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.3-beta.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-0wnbTJSfEcpn4CyRg+5fqIE6+91NLWtP0G3mhyucMS04EtqeTHbuV9WqWbf7g9OqUBQlvLmVSa/FClG+MOYLEg==","shasum":"c18a28fbf640d6a26e38f92bd3a39169b3c6cd48","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.3-beta.0.tgz","fileCount":48,"unpackedSize":85762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCjY+CRA9TVsSAnZWagAA2+8P/1ABguiz8PVeqqdd00YQ\nPAHkqKZttcosvpK6BlZOJx5JHmyl3Crr55VkOYAkoJXEPAMaIxdnDaYeR6o7\nlXbksWNtWiystqS4sFMoESWpuyfioRMeeo+Zh/6kYyb0K2+76g1GNaMOP+Ep\nWgq24q83h5tj5bnmZ9FLsvkzGubt3RG8ARCDIgsIDtSDHfP5jQje8u+DW5fI\nwxQmUIpwM13XWJTa2OApjQrMWNsLR381TZ6S2qemhAgx2BrBYBn7d5Wp40rq\niqSCFs8qaIopKE4kYFQduwm4G1T9cz00A/CetB21lGdgfz8V1WRA/gLm93KA\nACsEYvrVYbuqG82WGihzxEpkqRMTiXG9A52i/U8KVrVgYw1iGmdFFI/Q0zMI\nyMO0qs/Gz0daiXE3SoJOfFCbzH0nDekN+nrb4ynJTzRcM/cH0ycUYvu55aqM\nR2jeJBAbdF6YyjqSb5j6+BCUVdK6ItyQvAEDW2fn6h1Ghn7vsvHWHPgaAwaZ\nkCk8Wsg23TxpyCZo/aScZqZvbxWuttn/oan4hNtTDFuM6/kuCTITjCIab6GH\nXSaw7Px5KlZOnMZWUAEFgazmE3RSLxaWl37gH1NIhzs9Qof8F3N0MoCRLjgi\nrdIoPOvvBdjC9Qe6E/5iq+6X/ZA5EL5S8J+LxNRHxwnHmkRP2qM1eicg+2SU\nJqY2\r\n=VsXY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEp7MeVM+UcS+7xIE9tNT8pseSqqR+p7KLMKQGojS2uAiEAxXFatyPBTM1T76wNpJ973AayIvpymTWemOMOGE+DO+I="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.3-beta.0_1544173117597_0.04071453302391359"},"_hasShrinkwrap":false},"1.1.3-beta.1":{"name":"@modular-toolkit/bricks","version":"1.1.3-beta.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.2"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"6e7360026dc64086799c0aceb117f71df7dbcec9","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.3-beta.1.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.3-beta.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-xPMhCaV58TB1xMSGRLrs1NP6Hf1RdSg2SG5XrYqJ1MMe+BURGEVqmY9HnwuSGy+D0rqFxzgy82znijCXyRfMgw==","shasum":"72f73db6cc895fb503c00aaadf0132e257af8fd2","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.3-beta.1.tgz","fileCount":48,"unpackedSize":85786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHOLMCRA9TVsSAnZWagAAiuoQAJ7dQv14QB+WM42f+IVi\nEw9C56UdF4aZeBmi0KjBvIb4cHbdS2NbDbY1Z51GKF++x1B4oRRUcdOBLpzF\nbM8+MXyfpeXlqmEVsGM7PLbIlPAwVtheDRWIRa4EBlc3Doo1Kqqh0uBY7Pts\nivMsun8l0gCf/baQg+5Bum7dmyii17d7yhNSp6k+UG6pZ9PQwArYZIs9wGkm\nsOjwevjoQVhQToA5fxgcF5Lgsk1dnBaMlBowyuDO+Cs9tCJAqC3zNy5cCydy\nUD30JgfhKG7CjxXpIk6/Bi0WlaV6ty9XuvgW1yw/lnkr5QTP8qSxkA1+AZTK\nO9NUlUj3jr2OrvziehpbefZZp70C+DB1kgFB/9HFJvKw4ahMaR++1gu2chZq\n9Q3VedMWDYXXTh/TdeZj5iYJOH7jnkU5K8EV+l5sfdwUQ5lsqzARzae+U7fp\nPPVk2ummkOkV0UKeJaTfU59t1ZS2XS3LJOAqsZ8ij1L+13tjrS6UpTuk9u46\nEloymDM4EHj/S33kjNeURvmgMe4k1RhuoMu1+jwmuVFMIcvLTkaX5Yqy6w/S\nJpUIcBM4iFth4cSSnadziz+9H/j9WCuPNKw301UdkEZ8YZjUzUp9oWTqJjTo\n3h9Di2961uTWLMySGyXJ/LazKkuC60PM6QZUZtPBp4g1ip9aInBf7dFPskK1\n02/q\r\n=zj4/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3yfOprsjHhtz9dJr7BF0nPzRvsD2NpAOq1GDoqs85aAiBQaWHMaktDa2YQbHQXhFh23JphVnj45igIMKr5XEXs/g=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.3-beta.1_1545396939453_0.7322329218128345"},"_hasShrinkwrap":false},"1.1.3-beta.2":{"name":"@modular-toolkit/bricks","version":"1.1.3-beta.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.3-beta.0"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"862ed388ab2945225479f12878cb95f3cc238e43","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.3-beta.2.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.1.3-beta.2","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-KZftjlO5UBOLC0ytQ8ebB+24cPU3R+wGKrA+5SBh49iERe4yrMDla9WjBl/vd8Ms3gsa3t4jDTG2piRU+xt8DA==","shasum":"a797d4b400dadb68323d762a5aee0b365ec524cd","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.3-beta.2.tgz","fileCount":48,"unpackedSize":86025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHOvfCRA9TVsSAnZWagAAhxEP/0QMQlvcik3enFvfEU88\nJ5jY4SvGmdX2fRkmoQAlvDKxOYFgoLtQC6AiCj/66gqBs5MYUJzcLa06MAgg\nBkXqHIJxyzgyDjIrArXxbpaUoQd4m7BENejkMd5q2AO9DN2ykPvgzV3qL/F9\nedGbEo7+pWMQnP2hxazvlBTYwG078QL1gcIg0iJZFGWyZHiA0umzpQQk9IOE\ng/O0OnPi+FRPO1m2NNzvbJxLEq7rOweSVFR8J/UtAyKxhfhkjHJS1LLA1+ck\nYHi/C+KnM6kO59rOE01zoala7f0Ee54ZKAeWzQoq4pt8LD4r9Elchoy+p21n\n3jSYbr5uSUFs3QvOO8fZ2q2BaY6EuPK9+jWoSHH4W/E0Rwj7mQKszNo/MTCy\nHeteSk16MQUocbPiBqupZnMUMAyNe302Vqii3ym2UZSisj/topxLgwOfeUlx\nUaSbd5QaDKTpD2AkB3sAX/wBxmM5yIAOkuq01kbulA0MthK5L8tt/6ob6yAp\n/uxYhDJ1GR/ACKYlg9UpNwuo0nNMZZ8uAw58HNok94+IgQkSsWl5PioZyM/K\ni82uxBCBeqnyOnkNNFEaCDYDGgVTnCKzNVKgGQafIqujZpULSGLwQrAABzDF\n+zmy0lqLqCxL9CekQwHYiZqT/KgUfRfN47PwxD/wuqnpQaMokqiP3ehEB32n\nP8BL\r\n=OYxq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSKsOP/HFwfVRotyNBotq8Pnp+qlB9SJhmDdut/G7n8AiEAisqFZiesV9M0FPlPmuYAhOP0yILoY7luKmKmP8mepmE="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.3-beta.2_1545399262693_0.24266299696973515"},"_hasShrinkwrap":false},"1.1.3":{"name":"@modular-toolkit/bricks","version":"1.1.3","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.3"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"56f4758a4764b98c3770d2d08316c23d9bf638fe","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.1.3.tgz","_id":"@modular-toolkit/bricks@1.1.3","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-IhAKwvGZIAUEwgiR5ZZNQNyz1JRWPO2lNilINxER0wy3v3oqmsgZ5uBSQiytAbDDNmXOkeAcwujlBm0/Y6er4Q==","shasum":"c8d39931caa114c8453ec6f55602faabcefbd4d9","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.1.3.tgz","fileCount":48,"unpackedSize":86011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcI3R4CRA9TVsSAnZWagAAj0wP/iI4enCYH76s2LHvALmJ\nS1onz+usty8CmvabWNJgXbUUNchcfHSawEUxC3qbu+sAxDbglK0nHMvPnN/p\ngoU2M0P1zZCel1z1oKTbV/mB+6qVsWDbLmg+MSzVllBXjGdC2lDQmyiF7uF6\nasTAUUeK4Ve/7zeohlu+Jyv4sa2EEIbxMyzZQ5//+yIyrlXSjl8X6O+rjJBH\nWbfF9DwZl46cjegXIerWtPFXGNslX9nUsLalOpsVHPj4/y6cuu/gc855K4Vc\nMIenPI5bT4BiKRKxZAR0rlX0ksTjbEhUTaTncUPtpTBZemZNiEccfY5c6xmk\nXf9Cy/Nni+YckHbw/5NI5aqKyapix8/jEBNG9/lUrdKOjQ9L7y83BgXEmRXf\nPFNlzdpXQ37mO8L5cIpSdfal6mEPOiN37LCNqqIpHHYdDjgmGDwrvw9zbwQz\nk/LQFRWso7HgkYKet6OdQQ0VFAUlfJj/UTNnYJf4GQvEtqG+z+4R7yWulqwu\nB8z4lIzvT0XIxON0y/obWB0Me+Jyuu5yDuKmsaKyYHf/BId3slFd5tYC8zW6\nTOZXdDff/5fn4kl36Xx+8emG1mcrm2eTJucRUw303NsUOcp+hjAevQVCrgKU\nnjUxS+TZ44jsZPBNhsgdm1af5bj0wXRmpY8dGbHCavMFrqd5unu3n12AeqN9\n9wvW\r\n=38i8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXO/d7qFn6uOQflHAD/Tue8rfy3hDCAo9ts4pEBzpl+AiEAyY8F06J2iMnsHs044zeN9uTOo9LQNNXRXtdyeFd2vLk="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.1.3_1545827448125_0.2540237578866176"},"_hasShrinkwrap":false},"1.2.0-beta.0":{"name":"@modular-toolkit/bricks","version":"1.2.0-beta.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.3"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"0e1c5d57a4f249892df050061d036ac505766cf0","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.0-beta.0.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.0-beta.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-f+5BEDo3jaWd5iKMBTD4WsLCZD4kg634+vxSkHbAktWBLEXwRaa9msIyaYBMUxr9JrsXZQJ2SwKLhiKxd+lkPA==","shasum":"c513c0873a9f0f92b13e3bde1495eebed90c2d6a","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0-beta.0.tgz","fileCount":49,"unpackedSize":88990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcI7PKCRA9TVsSAnZWagAAEksP/icGh1pBcfPhyerS0w82\nTXrM04U9SDjKls31Y3mjnEjVxlIIKBQFQ9LsmfHKbzZxZtzWA7vgKq/Y5gNF\nyWhoky1rl1PuGC8oozIYoIr20sPTTZ7KzIpA0QXvPIz5S+dOeo74TbyBJeiF\n2jBLJ7+ieW0EUc04ZCnwSkVenuSk8AeZGHVaor6MW5slC9Q3RGCYv4yDnhxL\nR/ZPIHDDwsmdrTVOXgfZnlW5OhBvcdxjSAGjFuqgh+VX25j+BHvWYXj7CCHc\nNtS07kT0tsNzjHGt5NFNpPxd80xUG5Ln9PC1fe90u8MwkW9Nvz82CgjbNrT5\nqKkcu08QbHZdPm6PfWzYOFxHeJzohzmeLm04UDQs9Ygz6arPX/slIudRaI/4\na97VzI08rc6cqqLDZmAUXC9QnqR1pXDZ3mY2VwzgpcWv35c5IR6FBwWwm6NZ\nZhryjxFNJhf6OIkhNHgTtI4VTgozzgPZeaXLOxL3Ph1Tp5XdstX2xpccVgde\nsLCSTdQmcQFY9vtyj9Pvjs7PN2oOAhfFaaSjuMwDBNvZ3qKo4d/hMe+ObjVx\nvfyphDnM2ZlLJB5xvc1oEZfvMAvz8N2dZB+i6sGxZO9qpHO71lN2y6D1Dex+\nPJvFJ0HrU8ipZZcPJC2+fYWVl3bhuYVnv+5VJinHyLRjuQOyi+c23TcEMS0S\nT89M\r\n=ndHt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIBWTPv7tYs02ufWQvwsSeTKsx8un/u6dIDm4RbDdF7LdAh82TVqw7e2H4+rOvCLTueXcv5N3CPt/4smm3CyBgxW0"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0-beta.0_1545843657310_0.1232606908794307"},"_hasShrinkwrap":false},"1.2.0-beta.1":{"name":"@modular-toolkit/bricks","version":"1.2.0-beta.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.3"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"ef31aa2b075ba0741c2f74e36f1ca97c518faf07","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.0-beta.1.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.0-beta.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-aeE6fSoNzCbBd8kKYxOjiT3Ry8KuCXwF5+xLHrBQ11UWCsI2WyUuXLMVsTv3M9AbSRz+5dO2QzdYDN4LqwkFPQ==","shasum":"66d02f002777fa7fd8c93b00ad081949e6fde853","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0-beta.1.tgz","fileCount":49,"unpackedSize":89265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJL13CRA9TVsSAnZWagAAivsQAKFi7++aOqnG3ypMDsEX\nIKqEwJtNqoMeQd7hzPX+6k1b1l7dQD3XI0veF8Uih3bgSf4r81yDn8MP33qY\n/cylQIh3ifA/BqPL44rcNn8IhxRHtSOciHyR5saEesydz6kYrE2llPUUB/Tn\nxTHk57HwFBajhKDMfTEz0JHdPBeCu7TdPJ9NftjlLL7rdc8afXjvrjvppARA\nQuDDwleOdhFlOMUWGhvezcBdSJXH5yI2d75wiZVoQTIUJb+uyD3get9K0XLL\n+YMmlGsAKJW4uwCdAC/a4VbT501Ou6WkoZ/3YjEKSHCtJy1oo2rV+t4XgO83\nvgFam7LFTshb2/8zwHBcmV3bQtBsWALp7UTvfaxx8T+shIrfQAfiIwvo1mzc\nSE6/Mt2lbU37IXG08xmCVvrNoD9Z3jxjqdk+yCrxj57kVYb1MhI7lYsmsvul\nY+SayFDjdshMXf8lOSbM7TZrQFxjhICi0BaBBDDM3VkLbFBgPGFza2RSbgAj\ngY8CKjm49JRSfThnGCx+pXo6e7I2EX35DL2ZVsdlryNGzyDAat12dMwHBgVO\nQPCBf/d+RU2Dn+waa9FkMLru54EdrTW14zkr7JRiv9uPIN90EE/U2Tj7i+2a\n85hniOogZbQ3skESWAHDFNDqX5gnqQpbcof0wRrG/7B29/8vL8NABy6F/K/Y\nh3mb\r\n=KTOZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVcRyf2b7axUL2hsNkyzmfP6ZE66m9wZlDOVmN3EU1uAiEA2/PZekouN/2ZbecdeVMIeqRN1DQmrjUQ/XL60gCfwhM="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0-beta.1_1545911671050_0.1901544331136702"},"_hasShrinkwrap":false},"1.2.0-beta.2":{"name":"@modular-toolkit/bricks","version":"1.2.0-beta.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.3"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"b44ff876e4f95efe5e1114f4d3028f3d5eaf921f","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, sagaMiddleware);\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n*   `store` (required) – The redux store\n*   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n*   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n*   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n*   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists,\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n*   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-tookkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n*   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n*   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n*   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n*   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-eM7pDXhO2Lo9PBLckEh4H0FkIfVpw7NEwR6y6C0UoHpBbpw9AyIT3Ng6YWlarcKR796+z0Fvn/ldTGDpH0EM6w==","shasum":"d4b07e715c3a5fc568ee26e366d6e0076276bd55","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0-beta.2.tgz","fileCount":56,"unpackedSize":101222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJllECRA9TVsSAnZWagAAS3oP/jz1+R18UV8X/mIdMj4k\nn5DRk0xYwQL2CoNYqD/2NGndi7FoH0S/EyJt/giywaUbkrp6jEune4S663Q4\nnCrHxAIIGQpEV5Z2AeYVQrNuikDau5UVsH2nTVYKE5y5wlMwojdyIvcWWnhn\n9zisDcZa3kEIEJJSBxoe5eJtx//VqVuu21adOPV4/t4bvfGtRXGG2nlrMJIr\ngpXiVya9K+xmldjR0PigDOPIPR5wc24Yx0TQzZ0uzgTrnMouzBOHXQZXlQCU\nh8ZO5kcwSUjhSj4chXNpqAGk4neFu0doyltlnO/LpFlRJxBBmiSxp/HgQW4m\nzcJhhiTknOkxj261Ct299wKg8AneGJfHUQNBi6tilI7lHxOgVX2wjJczt5YS\nwU7/cEHy6kAXv/cRVRYWOZeLo9qRHOxozINQ3c2WC6k0Dqp66eK7z2jiqHyK\n+o4zWDuMgb1cN7coyDJK5rACXmrOce48EIQKlGfeItADWBfKmu6xt/B3lM5i\n02FLjgU3rplwp50bJY0qP6O8b4oeaHBUCGZxkK/XU38U3EJH4WIDMh8IqCnW\nT0UuzuLKkKv+5uT1wMkSeqz9RK2zsa8p6N42GC/IznyrJg22lZxaP6xnND+T\n37dbj82ba53aERlY6pip68HOJFtJSgmvw8PEs292ySQ7TmTv6QYBZL0VRWC4\nJOHC\r\n=tOHj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKca/xFqE7UU3jB/ashSueVBQaly2ujV4nsYUFr4Sb0AIhAMRijpdJfxYKD8eUmkwk6FWa9PFJ4r+oO7D+sgaK7qzT"}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0-beta.2_1546017091389_0.6756884680305841"},"_hasShrinkwrap":false},"1.2.0-beta.4":{"name":"@modular-toolkit/bricks","version":"1.2.0-beta.4","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4-beta.1"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"fa9f97325e1da9ef496c7521711afca719efe186","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.0-beta.4.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.0-beta.4","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-rDHo+tYlYvQrZkA1MvS0gxuEIwND1zc38ZZXvBhrcwKyXwiY6YMKfv+GHh9W/irgpPJGjAOZcwOatoAOoSK2uA==","shasum":"0eec5bb774c70e1146dd58aad2cd2b9f0b457543","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0-beta.4.tgz","fileCount":56,"unpackedSize":102725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL0pNCRA9TVsSAnZWagAAhM8P/jfIlZ8TE3Y+AnwUFdyl\n+EAcmUv53/92N/XyegwQp1rc6sO3pdJu3+cI0BvIZzhP7/yXaNIzZe7OfOEm\nzc+g1UdRKU22ekj7/4c8csvmpSIufscQuV9dkj+F2PrN8xdCME0gFbjgWHn0\nhbP/7OEEoBaRdz/9+cvaj0iGIaN9QMycP0ICYvyFQp2HiZHpLz8EFAYQYyvU\nqauvlARgB6QXdf60rJJEssXtBCbsZ12j7IgstY53TNvwpRzR98dfgjx1KNmq\ngmrC1N6SMEcMdOxEqFG9Ma/DG5BAP2sK3BJibS9k1FHl6qZkpsQLCQ0L8WMr\nlsmHiexwrGP7V74cwicMZ2JsrmGtIVWgkEc1uwGeRPeUn4FY7/aXeGAPQp51\nchDipiIrlvDEl+F7IGC33xqkrB5HwalRsub0k3P9JRUCWEP78V0UHIejY/FP\n9y075mx6PuDjaOPPcdJ4BD239jiwXyvnbrK/D1J+rG7JE64N6SOhr+j7YYn5\nGy6iClICVTqkNiQQsp/1p7ToWTNPjl7YIlUglmQVaNEgX7Wg6PH/m2VX5W9t\nDeGwCuVrw5WvA5tqIq4iNQmxefWZUjO0Pjl+8E4eCUxXfCuwansx5nRY6NbH\n8GD2ysIf9Qp2yyrbuoQQoLeJIzL5OSne4IZNcd095rPj7Ef/EqiiLGG5nwnU\nPX6r\r\n=TIR4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2yzqLrkGvvpBXoSH9r/a8rC7x2+gq+yisMe24Y/uj5wIgPc639YMnGw2YRD45vre2nK/p6xj9RVPeBNCWO3zVsRg="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0-beta.4_1546603085204_0.8021539019380299"},"_hasShrinkwrap":false},"1.2.0-beta.5":{"name":"@modular-toolkit/bricks","version":"1.2.0-beta.5","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4-beta.1"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"0393c7def0739e15a33b6e822a2a8e50f0f5c7ec","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.0-beta.5.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.0-beta.5","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-CJzCBAubXu5nCdLgTcl0TkFD33layw6b0AnmVV/siLx7pHjf0d8LLr2ZfSyghC7dd4nbK2I4ccRHXYGdColfMA==","shasum":"a7059d755cccf84826b39030c16bdc2bfe0e6fe9","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0-beta.5.tgz","fileCount":56,"unpackedSize":102780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMyI0CRA9TVsSAnZWagAAewMP/RhFAsNVVBxgwtqrRtSI\nIxZfrEKYtXtVBw2rMP0qoBRFsXYAa8znZ4Dvj4+tavlfi7RIn+19v2SsYDo1\np4R1FSNlmJNC0zbyWrZ1+kn6zzuJ9DjrVP8eRzK00Kn2gEZweaXvOGrvizyq\nR97su23AA3MMTpp6LHvlCFoaQFA4uyU7MANS/A+biFYVVxZlyZn6ksJuVXGu\nbdyVuwbfR4FViXjBpNnHBJ2veoJUgHbBTM0rbk2I6IK0oUXIMYdkVMHji0HX\nO7r1Zr8AxfWA/KY/DhROie+eoAdRuf1GxkgsXQVSxdClRngQqGxLfQsSDus/\n6Lf3E9Jq4+JkCvEGv34lHQEoGnwf9ogM+sqP/WiwpOxU6UX9gmqvRxyvoT4n\nOjx+bWM8wuX+6BaAigAzZHGQNi3n4BxAUcDn86N+5djGTCmkhLHR9GDfzI+Q\n6XTsp6wEX6GAU1d1kUezujKWUa3TExJmQuvxLGdSVCPeRQg0a0O6S8FYEcWE\n8oDqa/YO7Mh17YVaky1lYdzv9UK1gGFqh1aQSVxczzvEhysBYU2tNQdyi53t\n/SZQ3dNGGL+fszwbxYeUzeIL+JgzbUWmW/v9niaOx+xb99a8C1kAq1jY4ijl\nDdbWtfNYzTcWjglRACn9ivmnHwPdJX2sMQvMEc+X2jXpG8vevYwA4GZ+XH6c\n4WnT\r\n=66XY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDk+ddk3A8kgT17o1XrvNIOuym6P7lPaszYKeAkvqsQCAiEAq697x4mrAYdsVcn4GKW6vUmZKno6AK/Framand9CKMc="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0-beta.5_1546854963479_0.3377413086793952"},"_hasShrinkwrap":false},"1.2.0":{"name":"@modular-toolkit/bricks","version":"1.2.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"a66d7fa69d4c8820d60eaf769210ecadfd057cda","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.0.tgz","_id":"@modular-toolkit/bricks@1.2.0","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-YAYHaH5As1MkTYrRJ0E5TBHMQpXHlvPChMtaJExY+yjVJpsCmmzslb4VfV5oEBoKa05w81Jc/Oqn8ylky+nD9w==","shasum":"2ec7ac538b2fabdd78bcd2df3c29e375ec141341","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.0.tgz","fileCount":56,"unpackedSize":102766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMygOCRA9TVsSAnZWagAAiRUP/j/FpIVp/wblmfJTwluQ\nZVf6Y1Wt4NzZIvtDpqGNmk+rYHhzGCQtoRyt7HQaFeZEgVDbjNC8QY1oyVA6\nke/z4v7oDHbWTTLqhuw50crJz9XFb9fY9BiaskAyPjiaFpOpL9u/bnrK/Y0l\ntcqti12+HNint5QTvyzOXUYQ803M1mONCALXiN4vSmBLYNzUj3cQKiP3VPS6\n6b7bmMgIkH7atoeIf3UWz8mGzqI+xd+xv8RrWnE+tvzXhmXl0T+I7A9zSDWA\nY3LC+FBT+USV7vXnEsoCoqCVX8ArsekUOsQeXP4J4B9TNuvi1T/SelzNWPwi\ntPbnt5+mRDhn03w630gRfFgfNYtiQIY1gqZypSESQEQeiI/CKu5x2DVqkfx4\nOrBZvhIMhEX4RFIib1+LX/eQdPPG4BzDKCZnKj8Ax9LnNrKIAN8kox8/mydf\ndI+vZq8zArusIAADsvuNaMuJqBsPtdLgpA6tXGZ1IkoKbJ9gpcFwpVcdTML9\nksw7afqwKpAycAhf7dp5unBE7WuZiIDbPNILaCg5/ybzOGcdW+CNlJ7ZAXHJ\nzjnub2H1dSKs6V/p15hdnTH4lZnRhK85UJpr8xouoQh1bl23FDR2DI3UqLk6\n4CILE+3++4kH/kgBFLXyPgd2QU7H4fuBADXdvyCyRxzEeSKr6MkEptSJg0yF\neWo8\r\n=b7Ly\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLHACYtg6jJGrjd5g7SDOFRj3vT1lKN2qpwRvWQqAa8QIgTinkt/j7+Tj4JcpPQz346XmnJxkaQPBWDC0Qfjh25/Y="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.0_1546856461606_0.8329788633563846"},"_hasShrinkwrap":false},"1.2.1-beta.0":{"name":"@modular-toolkit/bricks","version":"1.2.1-beta.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"7a8279d64cd4ff52a34dd42f238dfa4156f47beb","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.1-beta.0.tgz","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@1.2.1-beta.0","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-9vjT2N3Wu33Whh4qKcgfoLI+WnqU9+DZbAVZ31RsUSXi3XkMvpve4jty2W+GiBKDB2jkqMvohk9JhHwG5dtp8A==","shasum":"8fef5a2c4cc04a8e95883e92aa168574a44f0a33","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.1-beta.0.tgz","fileCount":56,"unpackedSize":102830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNMW6CRA9TVsSAnZWagAAWcUP/i2f5q/anbOL35VRXO4E\n9keqfCMu3znfxW+BvgDetO79kuOdIZQZuhC1TPjwnuEom8d4jhCb0UYSTpGI\nS82Qp69XVgkS4Y8JL8+6xa7EM181mknqnrdWWBVdRRErInYEGyHn6uSyYWXz\nfl8k0lQUWzJeFBSlDXK0hxGyfcYKQF9QZswr6eTr866jA7K+KvZV4iPsQb/+\net1RSXMyJxJ5tPT3l3DJLgnyyZe3/x2SNkjdD/ITjf+tyvyKktxKs7sJmDU1\nWyUvcdVtOyG1ResKpg2fOW0Tly/4w82cilTsefx6e2WNaGOz1c0/3ZA4KI5X\nGPs0i1GRZmRIk/gz3zRBR8mgbCHFk8Ww/ll/Ob5Z49ycJLoyLZkaWqJZyJNl\n37tnSp4Zgm7Ny8yabjOIIo8/eI1Kdf5XOSjyV5CFtk5t4fZCjcEE1NKgbi+K\nF5GkglMGB2NfNVPEMRYYV9rACblL6ubDfwsrzONwYGSQ25uexjANUUoW5jeG\nugKIA/Ww1c1p9ZIpRNyuZPKGmv/R49950RIAmMnV0pgtCMprdcVG6FBrKIHd\nw+fxRaOJ+q30rV7km4MXoDwtS1Amg84FPjQJ9pd/BmXn9BEv4QyhVTW6erxV\nIaER58mb5j3twzVUNO9Q7M+8otDWp0UVPVK5bfvFucGMxzlMmbgjw6UN5GpG\n6qas\r\n=L8Nh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVQ9uvjsrQuEgs0m0rQq1ze5hyZSbPm+G3ePwwLCPsmQIgML2IQjmdlwDMq7LYOZNQeRa7olO8ua0mb4CJegtZNfA="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.1-beta.0_1546962361983_0.7447854079898435"},"_hasShrinkwrap":false},"1.2.1":{"name":"@modular-toolkit/bricks","version":"1.2.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"f4eea0c285257df8663ee3973ac2f915886da2ef","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.1.tgz","_id":"@modular-toolkit/bricks@1.2.1","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-dYsyXbP9qA7iswOWf+9i2uOOi4zJ3w0Hnz+cRGsFl+raAarEJpdNE4PKRVrwK90PBd4X3bTwPXqyeXZ+SoU81w==","shasum":"40b79fa03da7b32eb994b81002d7840b1b8ecb08","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.1.tgz","fileCount":56,"unpackedSize":102823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNbnICRA9TVsSAnZWagAAsDQQAJveBIxlb+2ltuTSO9qE\nHhmYalFii4AnWwjyq2nddTjwwlHQWy7lGvnhu51NnqoIfE3gAvdFEZsfaN0M\nBjpOM0xOH77zds1HUaOBARQo/qUapW05II2mAS7xV9FInihBw6Pa5YXcwjmO\nosTIXFKrWSW0aB7jmGFGtWB0eteLBIeq/aHfiTMgWLdJqGEctoJmtKqJ8ReV\no7M4IBduYRoj8wCDnXscp6Ju0DaJTV0Eci7buHJoppnT51R9vRhESDiOx86m\nJ/if2SvHjzVJbdZ4amgNuJ6JA8jUt+hgw+DoaWRDh1QU6gQneU2eJog+GiLW\nTRstsU1CA+VnWiuIeqq0zV9LENqVNOKdIF6+jM9cEvjFICUAeA2MV+gswmkS\nP10dZG6l+TigIcqQtzDbzFMawZxBZvbUAz53owzFbvWnFX5CdjDN/gKlODhs\nqPnnJkshJuNZi4iYMCb0sXXHcKkVDPCyDkzM+fa7z7WMr8U5FzyRqPvhEp47\n+pJGsiD5Lx9dBexL6q56yIUFL3ua+cOBqTLYS3aiRtMNoy9BzUctg49kAEPC\ngmKnGdC0fWw+yizAXiJ1LdIxgRFoY7KYKsdcG2eOxlN7fb3ZWPGKMakD5ir/\nxB4nR85wqhjHzZHBcYdE93OOSDVO130pS4lI1qYrAIlgHH4P1pgpzHTJzrI2\ny59V\r\n=J9YI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4MeSZxogZR+MXiScCcobUZwvKvrLCOBYaD9q4hNzh7AiBfnaHdAeiUGLtKZzGlQMh+ZYavzlfsMFNPweS5Dgr+dA=="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.1_1547024840064_0.5166971216588987"},"_hasShrinkwrap":false},"1.2.2":{"name":"@modular-toolkit/bricks","version":"1.2.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","dependencies":{"@modular-toolkit/selectors":"^3.0.4"},"peerDependencies":{"react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"321fdd9b9d8cf273474a0cf2a30c29b1069f6c95","_resolved":"","_integrity":"","_from":"file:modular-toolkit-bricks-1.2.2.tgz","_id":"@modular-toolkit/bricks@1.2.2","_npmVersion":"6.5.0","_nodeVersion":"8.10.0","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-WacOxiwALTjd3vOZQ/9uTODacvlonr4kTJnhxH8CNOjcX+UCHNKvXX2ghhLg3qTXP9bZzfOiiFqEd3t2jneuqQ==","shasum":"efec2e55ef3a58398e7585ad22a34c6814ad7e78","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-1.2.2.tgz","fileCount":56,"unpackedSize":102844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNh0FCRA9TVsSAnZWagAAiHAP/1tqcOZuRn/Sm7/sy996\nxPWPoIor0Bwis2awFSFd3oRKCBybGa+zcsSTcJR8VNNc5VGK/2n1Uryn7rzQ\njnTyM9B+BGIaQcjQJGj4SSPrG0/lefJEvdRFSB4kXR3LWEp4+IfJsxebpuxQ\ncvph3yvTGUVuwHdsUmyjlU8cx4BhF6JmIjVDY4neeC5IWDvW70Jhv9IEJ+0m\nLwOyIM9zKuoLFndSoI45+r40ydz/RGTQXcJetU2kmaJ6O9aqQq0+8Q9uUrAu\nAVfDhFuKhH+b+U0+nITnDtAn56I9/vhhMThwBUSFcydUeIbveYQsXiScR6Gj\n9Mp+Fgacdc3o9oqD0LVlBXbbqhILHn4rjjtAigFjYwzFzTmJXGUGHvcGvt5c\nRbji5JNimdFP9m+XSMlOA+8Xz1+zoPgF8wbUvNWsGFQDOZgWFWF/vNrhMbGg\noMA+KI9QqyU11bBb6asSAxPBQ1k16BLyi/8eFuNyz30dzHI9P6KFhJMjsnhc\nfvz5eqRMBFz7WtdKq2xpDB7lE+R9qPK9fihHkFCBttQy1gS6ZwuWOHmFQicp\njaxFqUuMm1KN/DKcAYyJNYunBAb2y+qGPCsq2hLNatJQdjhy193eeVZHTJJ0\nRFwnA8o1sox08VBxJt84T2wH8hgx928cnT4sEWQzfKHqW/myMPo9QjSSDnwQ\nv701\r\n=ElOp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPCs0Rtj1sGo5/YR9ItUA7uVEvd9Eq6LWj8HGeztg+kgIgQWV7pLC1lNSLpbJI7tXLw8Enh1ASV6FinGOdJnB8Fps="}]},"maintainers":[{"name":"ninja.maass","email":"jay.maass@gmail.com"},{"name":"pahund","email":"pahund@team.mobile.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_1.2.2_1547050244182_0.6412508380151072"},"_hasShrinkwrap":false},"2.0.0-beta.0":{"name":"@modular-toolkit/bricks","version":"2.0.0-beta.0","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","peerDependencies":{"@modular-toolkit/selectors":">=3.0.0 <4.0.0","react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"a7f8fa78f62d29c8d424701b329402e99f400ec2","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@2.0.0-beta.0","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.13.1/node@v10.15.3+x64 (darwin)","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-FYQpv9hLX2VDAG8MXamD4JvWdI3nnQxk3IOVxL9P9XKK8wEkjRl/9kYZlMrxB3u33WekIsTTLcYUrdUwbrnWHg==","shasum":"c3781d628c0fcc48ad6f4b675216315e4e5d9d0f","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-2.0.0-beta.0.tgz","fileCount":56,"unpackedSize":103237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrhJaCRA9TVsSAnZWagAA2yQP/jsESUs+axzRXQdQ09xx\n4eTF5ClTCP/+usk6wzX1Z1OJsTMAEKsFS6ID5/Iul5WRINf8vkuxejsIUG+p\nE/3+KM3KgpvgoUP/yy0IbjFgeKWTY0xyHFx7F9hKPVAtGMPsQaifdDG1tZtO\nixk6Kegin3zqi8VsJS7ddHSAJzid1S1jEp/yRUx4VwtRgTmg6mLMERv5W+yC\nXwmlA4F72V7Rxmzb7n9jcEnyDhVb6/Qn2eJrmgauJW6uN5Q5kOetxARC8wgT\nM5q6w1EiTE3Up1+owwrofIGuu8qgscFF5Z5e3doxLjNfMjAmA3fNH3kQLew5\ntUxKDXr2bcQYHJGaFgdFYxvsvLf/SFRqfzZy6lP6KjBTvVH1t81y+xTc/ZD2\n63QfLfavltQgRtOxEQIHDLFH2ki2EmnWj/MpjFajfQ0gPqFNHdEvDJ1rHQ60\nifVy3YwRgcEgIzcJnWNsnpKHlG6Z1CfQ5XU//aW5E5lAIQTmQHbaUYYNfK61\n65QxV/smY0NDNzIwtBV5ZV18ZgyT1JdCRd9ALbT2XNJLesr3EyK3RzeRLI4b\n3/mOI5gCg9Sfesma+tPN6Tc9fQ10YxrP9eXjRQrohJEJx6iIhT6hDQGzXEe5\n0/ue368jPRDgKt+eRfCOCCD0ykOn5fGTN57NN0IBwtmFuPXYzJsf2e0h2mYn\n8w2B\r\n=0hw1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQkFJuAZN9WIkNVQOKJymtH5u384UwhWS4OKSqWWetrwIgFIrwmNufDSpE5P08/d8B/j1FGRVI+RGTeAXg5tO7zvA="}]},"maintainers":[{"email":"dpavicic@ebay.com","name":"dpavicic"},{"email":"jay.maass@gmail.com","name":"ninja.maass"},{"email":"pahund@team.mobile.de","name":"pahund"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_2.0.0-beta.0_1554911833638_0.38388870686440724"},"_hasShrinkwrap":false},"2.0.0-beta.1":{"name":"@modular-toolkit/bricks","version":"2.0.0-beta.1","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","peerDependencies":{"@modular-toolkit/selectors":">=3.0.0 <4.0.0","react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"@modular-toolkit/selectors":">=3.0.0 <4.0.0","babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"aec4431919f930556d2bc1c25eec945ffc97a36c","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@2.0.0-beta.1","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.13.1/node@v10.15.3+x64 (darwin)","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-iyiM0kXEnUZmS97iHNInZYeGCU18QEdg3KfVZX0mK+F97mwAZmQ6jebTd96vo6HwpE/78Ac2ph0DmpWzFPTCkQ==","shasum":"7f2500a55244a5ef3c74b75b053869634848d10b","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-2.0.0-beta.1.tgz","fileCount":56,"unpackedSize":103365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczqymCRA9TVsSAnZWagAAq48P/i3wbO7wy3nLerDDvLaD\nZytGPzZ6oiyXbbpXAoOtEFVOYJLAd5uhO42Je91Opyh2WQ2MNQgyfj7Jn6Tv\nJG8SuX+s3maU1xw5SeMfbzIBsYYGcoatEfGPzgw2Tl4+sGMLwkV9KbeFFhZI\nFzVAda5rWK99b0u4EuxxXy7CS9eY7JAsEV8QFpGbBHzjoJ2lHMDow4NRL7c5\niWkUky5/12QAr+gSQsXrnTMMa4Uo70X3J1iDT/AEQaeDg3hLTSqydhrAkIvM\nJCtOkciUQiUmggNwKt1q4C+/LWudpntCUEC5iyiQkkV3JyAawnGo4/GM9Ki5\n7WfYfiQTpAn5ZiyCtU62aDiO1GA+VdsPA+TvW6y8q70Ufk41Ivbs2LhkIS9H\nwD2QjQWRniZNNppvBRGRr6C0D4IEyBvkiK8/nsEjYNAsewYk+iIk0Of5x4mN\nagO2rmK5tG4bfzPNscsqivLe8BDn2uyaO+FDzPcTz43vNgRsW6HafD5ohsnL\nPpSsR3ru11WgHzN/OtyRzKrx2aGh1iyljyCLkqmu61e6+2wwi09x1izWQRcW\n+sIMWw8e+9s4105kxdwheGuF3aGIgJ8zEZISabWluszBQsP9WIWP1oBKglVj\nz57eOawzBbnvnqa64VuqVAb7rtYUjKhmkE49kw5ynIHV2CMEMN5UZgfgiLYw\nZsYt\r\n=hBQJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChYH4a/IF9ZdHNmInukTCnbsg4h7AaZeohmgZe0FCBSgIgY4zcLguMHG7NCVVjcFHTwUiAN7R7tq8cCBnWZ+nQp/E="}]},"maintainers":[{"email":"dpavicic@ebay.com","name":"dpavicic"},{"email":"jay.maass@gmail.com","name":"ninja.maass"},{"email":"pahund@team.mobile.de","name":"pahund"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_2.0.0-beta.1_1557048486144_0.89045133586098"},"_hasShrinkwrap":false},"2.0.0-beta.2":{"name":"@modular-toolkit/bricks","version":"2.0.0-beta.2","description":"Tools for connecting high-level Redux components (“Bricks”)","esnext":"index-esnext.js","main":"index.js","sideEffects":false,"scripts":{"build":"webpack","test":"echo \"Error: no test specified\" && exit 1"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"license":"MIT","peerDependencies":{"@modular-toolkit/selectors":">=3.0.0 <4.0.0","react":">=16.3.0 <17.0.0","redux-saga":">=0.15.0 <1.0.0","reselect":">=3.0.0 <5.0.0"},"devDependencies":{"@modular-toolkit/selectors":"4.0.0-beta.2","babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"~6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","webpack":"^4.20.2","webpack-cli":"^3.1.2"},"gitHead":"df7a368c8a9e348e4039f7cb1b4b15c7f0a5085f","readme":"# bricks\n\nTools for connecting high-level Redux components (“Bricks”).\n\n## Installation\n\n    npm install --save @modular-toolkit/bricks\n\n**Note:** by default, the npm package exposes ES5-compatible code (transpiled through Babel).\n\nIf you want to use the untranspiled code (highly recommended), us the _esnext_ version, which is\nincluded in the same npm package ([more info here](http://2ality.com/2017/06/pkg-esnext.html)).\n\n## API\n\n### [BrickManager](src/BrickManager.js)\n\nThe Brick Manager allows you to “wire up” Bricks in your application by running each Brick's root saga with the\nRedux Saga middleware, preparing each Brick's selectors to work with the global Redux state, and replacing the\ncurrent root Reducer with a new reducer that includes each Brick's reducer.\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/configureStore.js_\n\n```javascript\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimport createInitialState from './createInitialState';\nimport reducer from './reducer';\nimport hackerNews from '@modular-toolkit/demo-module';\nimport gists from '@modular-toolkit/other-demo-module';\nimport { BrickManager } from '@modular-toolkit/bricks/BrickManager';\n\nconst initialState = createInitialState();\n\nexport default () => {\n    const sagaMiddleware = createSagaMiddleware();\n    const store = createStore(reducer, initialState, applyMiddleware(sagaMiddleware));\n    const brickManager = new BrickManager({ store, reducer, sagaMiddleware });\n    brickManager.installBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return store;\n};\n```\n\n### [combineReducers](src/combineReducers.js)\n\nThis function works exactly the same as [combineReducers](https://redux.js.org/api/combinereducers) from\nDan Abramov's Redux library, except that it does not issue a warning when an initial state is encountered that\ncontains keys for which there are no reducers defined.\n\nUse this version of _combineReducers_ if you want to combine reducers in your main application, while providing\nan initial state for Bricks that are added at a later point using the Brick Manager (e.g. when hydrating a server-side\nrendered page).\n\nHere is an example taken from the [demo app](../demo-app) that shows how it is used:\n\n_demo-app/src/reducer.js_\n\n```javascript\nimport { CHANGE_BACKGROUND_COLOR } from './actions';\nimport { combineReducers } from '@modular-toolkit/bricks';\n\nexport default combineReducers({\n    page(state = {}, action = {}) {\n        switch (action.type) {\n            case CHANGE_BACKGROUND_COLOR:\n                return {\n                    ...state,\n                    backgroundColor: action.backgroundColor\n                };\n            default:\n                return state;\n        }\n    }\n});\n```\n\n### [BrickProvider](src/BrickProvider.js)\n\nThis context provider wrapper allows you to pass a `BrickManager` instance to deep-nested components through\nthe [React context API](https://reactjs.org/docs/context.html), similar to the Provider of\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\n**Important:** Make sure the brick provider is _inside_ the Redux `Provider` (as shown in the example below), but always\n_around_ all other components, _especially_ `BrowserRouter` from React Router.\n\nThis example shows how to initialize Redux for your application, along with the `BrickProvider`:\n\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrickProvider } from '@modular-toolkit/bricks';\nimport { applyMiddleware, createStore } from 'redux';\nimport createSagaMiddleware from 'redux-saga';\n\nconst reducer = state => state;\nconst sagaMiddleware = createSagaMiddleware();\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware));\nconst { store, reducer, sagaMiddleware } = configureStore();\n\nReactDOM.render(\n    <Provider store={store}>\n        <BrickProvider store={store} reducer={reducer} sagaMiddleware={sagaMiddleware}>\n            <h1>Hello world!</h1>\n        </BrickProvider>\n    </Provider>,\n    document.getElementById('root')\n);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5)\n\nThe `BrickProvider` accepts these props:\n\n-   `store` (required) – The redux store\n-   `sagaMiddleware` (required) – The [redux-saga](http://redux-saga.js.org) middleware\n-   `reducer` (optional) – The application's root reducer\n\n### [withBrick](src/withBrick.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing a\nbrick when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { withBrick } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n}\n\nexport const enhance = withBrick('bricks.hackerNews', hackerNews);\n\nexport default enhance(MyComponent);\n```\n\n[![Edit Bricks Demo II](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vj1ywp5lz5?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPageContainer.js)\n\nThe `withBrick` function accepts three arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n-   `initialState` (optional, object) – An initial state that can be used for configuration (see below)\n\n### [withBricks](src/withBricks.js)\n\nThis function allows you to create a higher-order container component that enhances other components, installing\nmultiple bricks when the component is mounted. It works the same way as the\n[connect](https://redux.js.org/basics/usagewithreact#implementing-container-components) from\n[react-redux](https://redux.js.org/basics/usagewithreact#passing-the-store).\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is basically the same as [withBrick](#withBrick), except that you can install multiple bricks instead\nof just one by providing an object where the keys are store paths and the values are brick modules.\n\nExample:\n\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withBricks } from '@modular-toolkit/bricks';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\n\nfunction MyComponent() {\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n}\n\nexport const enhance = withBricks({\n    'bricks.hackerNews': hackerNews,\n    'bricks.gists': gists\n});\n\nexport default enhance(MyComponent);\n```\n\nThe `withBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Passing an Initial State\n\nIn some cases, it is desirable to configure the initial state of a Brick, to pass general configuration\nthat needs to be available when the Brick is installed.\n\nFor example, you may want to configure the base URL of an API used by a Saga to fetch data.\n\nThis can be done by passing an initial state object to the Brick Manager.\n\n### Using BrickManager.installBrick\n\n```javascript\nbrickManager.installBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using BrickManager.installBricks\n\n```javascript\nbrickManager.installBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n### Using withBrick\n\n```javascript\nconst enhance = withBrick('bricks.hackerNews', hackerNews, {\n    baseUrl: 'https://hackernews.com/api'\n});\n```\n\n### Using withBricks\n\n```javascript\nconst enhance = withBricks({\n    'bricks.hackerNews': { ...hackerNews, initialState: { baseUrl: 'https://hackernews.com/api' } },\n    'bricks.gists': { ...gists, initialState: { baseUrl: 'https://gists.com/api' } }\n});\n```\n\n## Experimental API\n\nReact version 16.7.0-alpha.0 introduces a revolutionary new feature called\n[Hooks](https://reactjs.org/docs/hooks-intro.html), which makes integrating bricks in your application much easier.\n\nNote that the following functions only work with the React alpha version noted above. They are not recommended\nfor production use _yet_ – proceed at your own risk.\n\n### [useBrick](src/useBrick.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBrick](#withBrick).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport { useBrick } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBrick('bricks.hackerNews', hackerNews);\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n        </div>\n    );\n};\n```\n\n[![Edit Bricks Demo IV](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9y6w47q10o?module=%2Fsrc%2Fpages%2Fhacker-news%2Fcomponents%2FHackerNewsPage.js)\n\nAs you can see in the example, you do not need to use an enhancer to create a higher-order component. All you need is\ncall the `useBrick` hook and the Hacker News brick is installed in your application's Redux setup and ready to use.\n\nThe `useBrick` function accepts two arguments:\n\n-   `storePath` (required, string) – The path to the part of the global Redux state that the Brick is working with; path\n    segments are separated by dots; example: `bricks.hackerNews`\n-   `module` (required, object) – The brick module that contains store, reducer and saga of the brick; this is usually\n    the default export of a brick package\n\n### [useBricks](src/useBricks.js)\n\nThis Hook function allows you to install a brick from within a function React component.\n\nYou must wrap your application with a [BrickProvider](#BrickProvider) for this to work.\n\nThis is a Hook version of [withBricks](#withBricks).\n\nExample:\n\n```javascript\nimport React from 'react';\nimport hackerNews, { HackerNews } from '@modular-toolkit/demo-module';\nimport gists, { Gists } from '@modular-toolkit/other-demo-module';\nimport { useBricks } from '@modular-toolkit/bricks';\n\nexport default () => {\n    useBricks({\n        'bricks.hackerNews': hackerNews,\n        'bricks.gists': gists\n    });\n    return (\n        <div>\n            Check out the latest Hacker News:\n            <HackerNews />\n            …and the latest Gists:\n            <Gists />\n        </div>\n    );\n};\n```\n\nThe `useBricks` function accepts one argument:\n\n-   `bricks` (required, object) – an object where the keys are store paths and the values are brick modules\n\n## Troubleshooting\n\n### Console Warning: “Unexpected key XXX found in previous state received by the reducer”\n\nIf you get this warning in your browser console, you're using _combineReducers_ from the Redux library.\nUse _combineReducers_ from _modular-toolkit_ instead ([see above](#combinereducers)).\n\n## Change Log\n\n-   See [CHANGELOG.md](CHANGELOG.md)\n\n## Contribution Guidelines\n\n-   See [CONTRIBUTING.md](../../CONTRIBUTING.md)\n\n## Acknowledgements\n\n-   Includes code taken from [Redux](https://redux.js.org) (_combineReducers_)<br>\n    [MIT licensed](https://github.com/reduxjs/redux/blob/master/LICENSE.md)<br>\n    Copyright © 2015–present Dan Abramov\n-   The _BrickManager_ module is inspired by [Reedux](https://github.com/Silviu-Marian/reedux)<br>\n    [MIT licensed](https://github.com/Silviu-Marian/reedux/blob/master/LICENSE)<br>\n    Copyright © 2017 Silviu Marian\n\n## License\n\n[MIT licensed](LICENSE)\n\nCopyright © 2018 mobile.de GmbH\n","readmeFilename":"README.md","_id":"@modular-toolkit/bricks@2.0.0-beta.2","_nodeVersion":"10.15.3","_npmVersion":"lerna/3.13.1/node@v10.15.3+x64 (darwin)","_npmUser":{"name":"pahund","email":"pahund@team.mobile.de"},"dist":{"integrity":"sha512-eWfS9rs6Mk7IwmzBXq7r1Jp63U8YOsnFM5Sky009O1RLQPMx65dBWGhD3jVqR9E6TJLS3+z9Ak9EEizVmN8hfg==","shasum":"cec32e17c90206a4435e95f3af891f7fbf6444aa","tarball":"https://registry.npmjs.org/@modular-toolkit/bricks/-/bricks-2.0.0-beta.2.tgz","fileCount":56,"unpackedSize":102978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczrF1CRA9TVsSAnZWagAAYIAP/1I8ukGYqqPDF66Rzd15\n08Zv93SZjzqqM8RtcOG2f1erkysJcINT5t1eII6ICkOxbHmtCSHWF0Nr3Cor\nC52HrBqAdY3+GNIpfZ8SpDa1MCkWPAnxcw1RSPfas6qViCKtxvlUUz9XxcAs\nyb1rcBJiLV9MtYV52T64tUDethwPoqzrMTqyHcQTOdQax9/3t95Iz8uF7G/h\nwspI58Q4YZgxzMhP1DXbcgTci2gXb4ZSe7gzZT76jOs+uf0oDHyIiV4bW4nG\nm5XnDxxLozfGU5x4dBZG5QMomzD3nWEPjkGv5ky2v7S1Ar7rkYMmP5Ojv8h1\nHue4Q0R/dOnk05/cJaTPiSjU2fsuWCldgliirsWy3q3YrVh6ENT2rmy+QV7Q\n/nLDN/SeL4C/e2qm4wdlU9FUCN7X6s/GV4+drveekG8Qcn0aRlzNKSFNUHGZ\nhqtSFkGsZLikwNv/Y1pGq1UOF1FP45x1l6Eut1FphpBt2IMvN7mR/1MWH0pK\ncwsu7AlUD+6tIGDEDNfLOsZNShNskqZt8QphsLxeslTO6RxcWIedAMSn+JNT\nTQ+QGt9kYiY8/ZojaF17qLhck39VOWsURskKR5RbyUauH8Kj5gP0BDBGDpOx\nhzXItemHIfxbr9ivgJyt8McNvWYCIlSIQMc5sXStdbNzLesaW8TQNtQlUzbe\nAEoR\r\n=IHIz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzvkFG8obxj+U3K4SUF6rrpMYyC9VrPny/dfqCC2OXYAiBMvM30NvdUxTdhBW00e9N0OE9GFEr+/OP/kOvF9k4MxQ=="}]},"maintainers":[{"email":"dpavicic@ebay.com","name":"dpavicic"},{"email":"jay.maass@gmail.com","name":"ninja.maass"},{"email":"pahund@team.mobile.de","name":"pahund"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bricks_2.0.0-beta.2_1557049716428_0.10116277152411834"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-23T10:56:15.612Z","1.0.0":"2018-10-23T10:56:15.841Z","modified":"2022-04-06T06:11:30.892Z","1.0.1":"2018-10-25T07:42:20.998Z","1.1.0-alpha.0":"2018-10-25T11:38:47.582Z","1.1.0-alpha.1":"2018-10-25T12:47:48.031Z","1.1.0-alpha.2":"2018-10-25T13:01:37.362Z","1.1.0-alpha.3":"2018-10-27T19:53:11.114Z","1.0.2":"2018-10-31T10:12:46.508Z","1.1.0-beta.0":"2018-10-31T10:23:19.853Z","1.1.0":"2018-11-01T08:20:58.749Z","1.1.1":"2018-11-14T06:54:43.740Z","1.1.2":"2018-11-14T06:56:40.008Z","1.1.3-beta.0":"2018-12-07T08:58:37.758Z","1.1.3-beta.1":"2018-12-21T12:55:39.626Z","1.1.3-beta.2":"2018-12-21T13:34:22.842Z","1.1.3":"2018-12-26T12:30:48.288Z","1.2.0-beta.0":"2018-12-26T17:00:57.518Z","1.2.0-beta.1":"2018-12-27T11:54:31.198Z","1.2.0-beta.2":"2018-12-28T17:11:31.557Z","1.2.0-beta.3":"2019-01-04T10:02:59.626Z","1.2.0-beta.4":"2019-01-04T11:58:05.374Z","1.2.0-beta.5":"2019-01-07T09:56:03.610Z","1.2.0":"2019-01-07T10:21:01.838Z","1.2.1-beta.0":"2019-01-08T15:46:02.123Z","1.2.1":"2019-01-09T09:07:20.183Z","1.2.2":"2019-01-09T16:10:45.508Z","2.0.0-beta.0":"2019-04-10T15:57:13.821Z","2.0.0-beta.1":"2019-05-05T09:28:06.306Z","2.0.0-beta.2":"2019-05-05T09:48:36.527Z"},"maintainers":[{"email":"dpavicic@ebay.com","name":"dpavicic"},{"email":"jay.maass@gmail.com","name":"ninja.maass"},{"email":"pahund@team.mobile.de","name":"pahund"}],"description":"Tools for connecting high-level Redux components (“Bricks”)","contributors":[{"name":"Ninja Maaß","email":"jmaass@team.mobile.de"},{"name":"Daniel Schäfer","email":"danschaefer@team.mobile.de"}],"author":{"name":"Patrick Hund","email":"pahund@ebay.com"},"license":"MIT","readme":"","readmeFilename":""}